Tutorial sequence

Testing the Mechanism

4of 4 published
  1. 01

    intermediate / 32 min

    Fixtures are a dependency graph

    Model pytest setup as a scoped dependency graph with explicit ownership, caching, and teardown edges.

    Read
  2. 02

    intermediate / 31 min

    Patch where the name is looked up

    Understand Python name binding so mocks replace the object production code will actually resolve.

    Read
  3. 03

    advanced / 32 min

    Import state, module caches, and test isolation

    Test import-time behavior without confusing module caching, finder caches, reload, and process isolation.

    Read
  4. 04

    advanced / 32 min

    Testing concurrency and cancellation without timing roulette

    Replace sleeps and scheduler luck with barriers, events, bounded waits, and observable lifecycle assertions.

    Read