testing
Installation
SKILL.md
Python Testing
A collection of test-writing best practices for pytest. Designed for AI agents and LLMs to write readable, maintainable, and trustworthy tests.
Categories
Mocking [CRITICAL]
Mock external boundaries only, and keep mocks faithful to real interfaces.
| Rule | Description |
|---|---|
| mock-boundaries | Mock external boundaries, not internal logic |
| mock-autospec | Use autospec to keep mocks faithful to real signatures |
| mock-monkeypatch | Use monkeypatch for env vars and attributes |
Test Structure [HIGH]
Structure tests so failures are easy to diagnose.