testing-conventions 0.0.76

Enforce testing conventions in libraries (Python, TypeScript, and Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
# Waived fixture for R1 (#49): identical to the red fixture (takes pytest's
# `monkeypatch`), but waived in the colocated testing-conventions.toml — so it
# must be silent.
import os


def describe_widget():
    def it_reads_the_token(monkeypatch):
        monkeypatch.setenv("MYPROJECT_TOKEN", "test-token")
        assert os.environ["MYPROJECT_TOKEN"] == "test-token"