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

Use a different exit code when collection fails #1122

Open
Redoubts opened this issue Aug 27, 2024 · 0 comments
Open

Use a different exit code when collection fails #1122

Redoubts opened this issue Aug 27, 2024 · 0 comments

Comments

@Redoubts
Copy link

I noticed https://pytest-xdist.readthedocs.io/en/stable/known-limitations.html#order-and-amount-of-test-must-be-consistent

And indeed I expect pytest to fail if I have some randomness in my test definitions (say a random parameterized fixture).

Different tests were collected between gw1 and gw2. The difference is:
...

But I noticed that pytest exits with code 1 in this case. This code is reserved for "collected but failed" https://docs.pytest.org/en/stable/reference/exit-codes.html. I think this should be either code 3 or 5, but at least not code 1 since this feels like a collection or otherwise "internal" error.

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