python-testing-patterns - Build robust Python tests with pytest
Provides patterns for Python testing with pytest, fixtures, mocking, parameterization, exceptions, and test-driven development.
Tags
Updated: 2026-10-01Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Write pytest tests
- Create reusable fixtures
- Parameterize test cases
- Mock external dependencies
- Test raised exceptions
- Test API integrations
- Test asynchronous code
- Measure test coverage
- Isolate test state
- Debug failing tests
Inputs
- Python source code
- Test requirements
- External dependency interfaces
- Database operations
- API and service behavior
Outputs
- Python test files
- Test execution results
- Test coverage measurements
- Configured test suites
Requirements
- Python environment
- pytest
- Python mocking support
