01
Fixtures are a dependency graph
Model pytest setup as a scoped dependency graph with explicit ownership, caching, and teardown edges.
Independent field notes / Vol. 01
Precise explanations of the machinery, patterns, and tradeoffs that make Python feel deceptively simple.
Read the cover storyThe index
4 notes, edited for signal.
Model pytest setup as a scoped dependency graph with explicit ownership, caching, and teardown edges.
Test import-time behavior without confusing module caching, finder caches, reload, and process isolation.
Understand Python name binding so mocks replace the object production code will actually resolve.
Replace sleeps and scheduler luck with barriers, events, bounded waits, and observable lifecycle assertions.
Editorial policy
No listicles. No folklore. No just trust me abstractions.
Every note should leave you with a better model of the system, not just another snippet to paste.