Use the narrowest test that can disprove the current change, then widen coverage after it stabilizes.
The decision behind the technique
A full suite on every edit wastes time and usage; only running one test misses integration failures. The sequence matters.
Use the narrowest test that can disprove the current change, then widen coverage after it stabilizes.
A practical step-by-step workflow
Use this sequence as a default, then tighten or expand it only when the evidence changes.
- Run the failing or nearest unit test
- Run the affected module or package tests
- Run typecheck and lint for changed interfaces
- Finish with the full required suite
Failure boundary and finish line
Do not skip the broad check when shared types, build configuration or cross-package behavior changed.
Finish when another person can reproduce the check against the exact final state.
Frequently asked questions
What should I do first?+
Run the failing or nearest unit test
What is the main failure mode?+
Do not skip the broad check when shared types, build configuration or cross-package behavior changed.
OFFICIAL SOURCES
Verify against the source
pytest usage guideOpenAI Codex best practicesThis guide provides general information, not an OpenAI allowance promise or support decision. Your account and official pages govern actual usage, benefits and recovery times.