python-testing
Installation
SKILL.md
Python Testing Patterns
Comprehensive testing strategies for Python applications using pytest, TDD methodology, and best practices.
When to Activate
- Writing new Python code (follow TDD: red, green, refactor)
- Designing test suites for Python projects
- Reviewing Python test coverage
- Setting up testing infrastructure
- Choosing the correct scope (
function,module,session) for a pytest fixture - Debugging flaky tests caused by shared mutable state or incorrect mock namespaces
- Parametrizing tests to cover multiple inputs without duplicating test logic
- Enforcing 80%+ coverage with
pytest --covand understanding which lines are uncovered