What problem does it solve?
Helps you design and maintain consistent Python test suites so bugs are caught early and behavior stays correct as your code evolves, using pytest practices.
Core Features & Use Cases
- Test-Driven Development (TDD): Guides the RED-GREEN-REFACTOR loop to shape implementation around expected behavior.
- Coverage & Quality Guardrails: Sets concrete coverage targets (80%+ overall, 100% for critical paths) and shows how to measure with pytest-cov.
- Practical pytest Techniques: Covers fixtures (scopes, autouse, parameterized), parameterization, markers and test selection, mocking/patching, async testing, exception testing, and managing side effects.
- Use Case: When adding a new Python module, you can create tests first, use fixtures/mocks to isolate dependencies, parameterize edge cases, and ensure critical paths are fully covered before merging.
Quick Start
Activate this skill when you are adding or refactoring Python functionality and want an actionable pytest strategy that includes TDD, fixtures, mocking, parameterization, markers, async tests, and coverage targets.