Appendices
Reference material: build and toolchain, pytest, mocking, xUnit test patterns, a pattern-to-force quick reference, and programming principles reviewed in code.
Build and toolchain reference: uv, ruff, mypy
Reference for the uv, ruff and mypy commands, the one root configuration each tool reads, and the traps between them.
pytest reference
Reference for the pytest configuration, import mode, fixtures, parametrisation, exception assertions and command-line options the examples rely on, each with the pytest page that describes it.
Mocking reference: unittest.mock and pytest-mock
Reference for the unittest.mock and pytest-mock names the examples use, in the order they're preferred, each with the call that shows it.
xUnit test patterns (Meszaros)
Gerard Meszaros's xUnit test patterns for fixtures, test doubles, verification and dependency injection, mapped onto pytest and pytest-mock, with the two places where pytest-mock's names mean something else.
Pattern-to-force quick reference
Four tables that give, for each pattern developed, its bucket, its force and its when-not rule in the words of the chapter that develops it, with a link to that chapter.
Programming principles reviewed in code
Reference to the programming principles the code shows, with the chapter that states each one, what it measures and, where one was fetched, the page it comes from, plus a runnable example of the Law of Demeter.