What this site covers
This site is built for engineers who already know the basics of Python testing and now need patterns that scale. The guides focus on production-grade trade-offs: fixture design for large suites, stricter mocking contracts, coverage that means something, reproducible debugging workflows, and generated-input testing for the edges nobody enumerated. Every guide is written for real codebases — monorepos, async services, and CI pipelines that have to stay fast and green.
Eighty-four guides across four tracks, each one built around runnable code, the failure modes you will actually hit, and the diagnostics that separate a hypothesis from a fix.
Explore the four tracks
- Advanced Pytest Architecture & Configuration — scale fixtures, plugin hooks, discovery and coverage across large suites. Start with Mastering Pytest Fixtures, Advanced Parametrization Techniques, Building Custom Pytest Plugins, and the new Coverage Measurement and Enforcement.
- Advanced Mocking & Test Doubles in Python — tighten isolation with Autospec & Strict Mocking, Patching Strategies for Complex Codebases, Dependency Injection for Testability, and the new Faking the Filesystem and Environment.
- Property-Based & Fuzz Testing Strategies — go beyond examples with Hypothesis Framework Fundamentals, Advanced Property-Based Testing, Stateful & Model-Based Testing, and the new Coverage-Guided Fuzzing with Atheris.
- Systematic Debugging & Performance Profiling — diagnose failures with Interactive Debugging with pdb and ipdb, Memory Profiling with tracemalloc, CPU Profiling with cProfile and py-spy, and the new Debugging Tests in CI and Containers.
Start with the problem you have
- A test fails only in CI. Work the environment checklist in reproducing CI-only test failures locally, then capture what you need with attaching debugpy to a container.
- Collection or the suite is slow. Prune the walk in cutting collection time with norecursedirs, then parallelise safely with pytest-xdist vs pytest-parallel.
- A mock is passing for the wrong reason. Read assert_called_with vs call_args_list and lock the contract with create_autospec vs patch(autospec=True).
- A patch has no effect. Find the binding in where to patch, or the timing in patching decorators applied at import time.
- Memory grows and nobody knows why. Diff snapshots in finding memory leaks with tracemalloc snapshots, then name the retainer with finding reference cycles with gc and objgraph.
- Coverage reports zero under parallel runs. The combine step is missing — see why pytest-cov reports 0% under xdist.
- An async service is slow at eight percent CPU. Something is blocking the loop: finding blocking calls with asyncio debug mode.
Suggested reading order
- Begin with the pytest architecture guides to understand fixture resolution, collection, configuration and coverage measurement.
- Move into mocking, patching and dependency injection when you need better isolation boundaries — and into faking the filesystem and environment when tests start leaking state into each other.
- Add property-based testing, and then coverage-guided fuzzing, once your baseline architecture is deterministic and your parsers handle untrusted input.
- Reach for the debugging and profiling workflows whenever a failure resists reproduction, a suite starts leaking memory and time, or a failure appears only inside CI.
Who this is for
The material assumes strong Python fundamentals and targets mid-to-senior developers, QA/SDET engineers, and maintainers who need to improve reliability, debugging speed, and CI performance. Every page states its version requirements, gives runnable code, and ends with the edge cases that break the pattern.