What problem does it solve?
This Skill provides a disciplined approach to testing Python applications using pytest, TDD workflows, fixtures, mocking, parameterization, and rigorous code coverage; it helps teams reduce regressions and improve test reliability.
Core Features & Use Cases
- TDD-driven workflow: follows red-green-refactor cycles to drive code quality.
- Fixtures & parameterization: promotes reusable setup and data-driven tests for robust coverage.
- Mocking & isolation: isolates units by mocking dependencies to ensure deterministic tests.
- Code coverage goal: encourages 80%+ coverage with actionable reports and checkpoints.
- Use Case: For a new Python module, write tests first, run pytest to guide implementation, and progressively increase coverage with fixtures and mocks.
Quick Start
- Install the tooling: pip install pytest pytest-cov
- Create tests under a tests/ directory using pytest style.
- Run tests with coverage: pytest --cov=mypackage --cov-report=term-missing --cov-report=html