pytest -x # stop after first failure
pytest --maxfail=2 # stop after two failures
See the pytest documentation.
pytest -x # stop after first failure
pytest --maxfail=2 # stop after two failures
See the pytest documentation.