Pytest Patterns

Pytest testing patterns, anti-patterns, and quality rules for Python test files (test_*.py, *_test.py, conftest.py). Includes deterministic test-smell detector (pytest_smell.py) for no-assertion tests, empty tests, bare excepts, magic numbers, sleep calls, and print calls. Covers fixtures, parametrize, mock, patch, and assert patterns. Use proactively when reviewing or writing pytest test files, diagnosing flaky or unreliable Python test suites, code-reviewing test files, or running a CI quality gate on test file hygiene. Run the smell detector for deterministic issue detection.

Everyone-Needs-A-Copilot 406742f 3 files · 86.8 KB Updated

File contents

Everyone-Needs-A-Copilot/claude-copilot/tree/main/.claude/skills/testing/pytest-patterns commit 406742f6cb

Frequently asked questions

npx skillmds@latest add everyone-needs-a-copilot/pytest-patterns