Python Testing with pytest, fixtures, and Hypothesis
Parent: Programming Languages · researched 2026-06-01T01:37:38.136Z· 14 sources · 9 concepts · skill programming-languages
Programming-languages family ROUTER. Split into: lang-python (Python idioms, testing, typing, uv toolchain, packaging, CPython internals, pydantic); lang-js-ts (JavaScript/Node, TypeScript, Deno/Bun/e
programming-languages
- Programming-languages family ROUTER. Split into: lang-python (Python idioms, testing, typing, uv toolchain, packaging, CPython internals, pydantic); lang-js-ts (JavaScript/Node, TypeScript, Deno/Bun/edge runtimes, V8 internals, zod, JS debugging); lang-go-and-mobile (Go patterns, Kotlin/Compose Multiplatform). Route to the sub-hub for the language in question. [source]
- This hub routes to on-demand reference files under references/. See each spoke for depth. [source]
Children
- pytest fixtures (scope, conftest.py, yield/finalization, autouse, built-in fixtures) (frontier)
- Parametrization (parametrize, indirect, custom IDs, pytest_generate_tests) (frontier)
- Markers and configuration (skip/xfail/skipif, custom markers, pyproject.toml) (frontier)
- Mocking (monkeypatch, unittest.mock, pytest-mock mocker/spy) (frontier)
- Hypothesis property-based testing (@given, strategies, map/filter/flatmap, @composite, @example, shrinking, settings/database) (frontier)
- Hypothesis stateful testing (RuleBasedStateMachine, rules, invariants) (frontier)
- Async testing (pytest-asyncio, AnyIO backends) (frontier)
- Coverage (pytest-cov, branch coverage, fail-under) (frontier)
- Parallelism (pytest-xdist) (frontier)
Frontier under this node: Async testing (pytest-asyncio, AnyIO backends), Coverage (pytest-cov, branch coverage, fail-under), Hypothesis property-based testing (@given, strategies, map/filter/flatmap, @composite, @example, shrinking, settings/database), Hypothesis stateful testing (RuleBasedStateMachine, rules, invariants), Markers and configuration (skip/xfail/skipif, custom markers, pyproject.toml), Mocking (monkeypatch, unittest.mock, pytest-mock mocker/spy), Parallelism (pytest-xdist), Parametrization (parametrize, indirect, custom IDs, pytest_generate_tests), pytest fixtures (scope, conftest.py, yield/finalization, autouse, built-in fixtures)