python-testing-patterns

Installation
SKILL.md

Python Testing Patterns

Write tests that make behavior safer to change. Prefer focused, readable tests over clever fixtures or coverage theater.

For advanced patterns such as async tests, monkeypatching, property-based tests, database testing, CI, and coverage tooling, read references/advanced-patterns.md.

Core Principles

  • One behavior per test. A failure should point to one broken behavior.
  • Arrange / Act / Assert. Keep setup, execution, and verification distinct.
  • Test boundaries and errors. Happy-path tests alone are weak.
  • Isolate external effects. Mock network, time, randomness, and services when they are not the behavior under test.
  • Use meaningful coverage. Cover important behavior and risks, not every line.

Basic Pytest Pattern

Installs
38
GitHub Stars
2
First Seen
Jun 15, 2026
python-testing-patterns — jurgendn/agent-skills