Limit noise during triage.
Section: Selecting What to Run
Stop after N failures
bash
bash
pytest --maxfail=2Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Selecting What to Run
Re-run a failing test repeatedly
Loop a single test to reproduce flakiness locally.
Print key environment values in a test
Reveal CI-only configuration mismatches.