Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] --reruns-on-exitfirst: set reruns with --exitfirst / -x #249

Open
tony opened this issue Feb 15, 2024 · 0 comments
Open

[RFC] --reruns-on-exitfirst: set reruns with --exitfirst / -x #249

tony opened this issue Feb 15, 2024 · 0 comments

Comments

@tony
Copy link
Member

tony commented Feb 15, 2024

Assume pyproject.toml:

[tool.pytest.ini_options]
addopts = "--reruns 2"

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:

  -x, --exitfirst       Exit instantly on first error or failed test
@tony tony changed the title [RFC] Support --exitfirst / -x (behave like --reruns 0) [RFC] --reruns-on-exitfirst: set reruns with --exitfirst / -x Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant