Tutorial sequence
Testing the Mechanism
4of 4 published
- 01Read
intermediate / 32 min
Fixtures are a dependency graph
Model pytest setup as a scoped dependency graph with explicit ownership, caching, and teardown edges.
- 02Read
intermediate / 31 min
Patch where the name is looked up
Understand Python name binding so mocks replace the object production code will actually resolve.
- 03Read
advanced / 32 min
Import state, module caches, and test isolation
Test import-time behavior without confusing module caching, finder caches, reload, and process isolation.
- 04Read
advanced / 32 min
Testing concurrency and cancellation without timing roulette
Replace sleeps and scheduler luck with barriers, events, bounded waits, and observable lifecycle assertions.