python-testing-patterns - Build Python tests with pytest and proven patterns
Implement Python testing strategies with pytest, fixtures, mocking, parameterization, and test-driven development.
Tags
Updated: 2026-10-15Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Write pytest tests
- Define reusable fixtures
- Parameterize test cases
- Mock external dependencies
- Test asynchronous code
- Verify exceptions and coverage
- Structure tests with TDD
Inputs
- Python source code
- Test requirements
- External dependencies
- Database operations
Outputs
- Test files
- Test execution results
- Coverage measurements
Requirements
- Python runtime
- pytest framework
