Pytest patterns¶
Status: Placeholder — to be developed. Last reviewed: —
Scope¶
Conventions for tests: directory layout, fixture scope, factory usage, integration vs. unit boundary, when to hit the real DB, naming, what make test / make test-k / make test-f / make test-x actually do.
Sources to mine when writing this¶
conftest.py(root) and any per-appconftest.pyfiles.pytest.iniconfiguration.Makefiletest targets — document what each one is for.- Existing test factories (factory_boy or hand-rolled) — converge on one pattern.
- The recent
test_entity_holderfix (commit76c7d45— "pin entity name, not just code") — that's a worth-documenting lesson about test brittleness.