unit-testing
Installation
SKILL.md
unit-testing
Practical, production-ready testing patterns for Python projects using pytest.
Overview
pytest makes it easy to write small, readable tests and scale to large suites. It provides plain assert statements, fixtures for dependency injection, parametrization, and a powerful plugin system.
When to Use
- Adding unit tests for new code paths
- Refactoring with regression coverage
- Designing clean setup/teardown with fixtures
- Handling flaky tests with deterministic patterns
When Not to Use
- End-to-end browser tests (use Playwright or Selenium)
- Non-Python services (use their native frameworks)
Related skills