python-testing
Installation
SKILL.md
Python Testing
Priority: P0 (CRITICAL)
Core Rule Anchors
[BE-TEST-01]Parametrized Tests for Equivalent Inputs: Preferpytest.mark.parametrizefor equivalent inputs and boundary permutations. Distinct scenarios may stay separate.[BE-TEST-02]Ban on Brittle SQL String Matching: Test pure domain calculations directly or use fakes/testcontainers; do not regex-match SQL strings in mocks.[BE-TEST-03]Ban on Shallow Assertions: Never assert onlyassert resultwithout inspecting domain attributes and invariants.[BE-TEST-04]Ban on Pass-Through Seam Mocks: Repositories and adapters must test contract compliance and error mapping; ban 1:1 pass-through mock echoing.[BE-TEST-05]Bug-First Regression Lock: Every PR fixing a bug ticket or with titlefix(...)must introduce a failing test reproducing the defect before fixing it.