testing-python
Installation
SKILL.md
Testing Python
Tests prove features work. Coverage is secondary. E2e tests beat unit tests. Real beats mocked.
Philosophy
- Trustworthiness > coverage. A test that mocks away the tested thing proves nothing.
- 5 good e2e tests > 100 unit tests with heavy mocking.
- Pareto principle. Write the fewest tests that cover 80% of what matters. E2e tests naturally do this.
- Unit tests for pure logic only. Functions that transform data honestly.
- Real over mocked. Real HTTP servers (pytest-httpserver), real tmp dirs, real processes.
Test Planning
When writing new tests, plan before coding: