python-testing-patterns - Build robust Python tests with pytest
Guides Python testing with pytest, fixtures, mocking, parameterization, async testing, and test-driven development.
Tags
Updated: 2026-10-15Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Write pytest tests
- Define test fixtures
- Parameterize test cases
- Mock external dependencies
- Test raised exceptions
- Test asynchronous code
- Measure test coverage
- Isolate test state
- Debug failing tests
Inputs
- Python source code
- Test requirements
- Dependency interfaces
- Test data
Outputs
- Python test files
- Test execution results
- Failure diagnostics
- Coverage measurements
Requirements
- Python runtime
- pytest installed
