Open tony opened 5 months ago
Assume pyproject.toml:
pyproject.toml
[tool.pytest.ini_options] addopts = "--reruns 2"
Right now, passing --exitfirst / -x will rerun twice.
--exitfirst
-x
--reruns-on-exitfirst 0
This way, the user can set the reruns with exitfirst is used so it instantly errors. It preserves the default behavior.
exitfirst
--exitfirst's docs:
-x, --exitfirst Exit instantly on first error or failed test
Assume
pyproject.toml
:Current behavior
Right now, passing
--exitfirst
/-x
will rerun twice.Better:
--reruns-on-exitfirst 0
This way, the user can set the reruns with
exitfirst
is used so it instantly errors. It preserves the default behavior.--exitfirst
's docs: