Exit code consolidation
See original GitHub issueWe don’t know in advance how many workers we need for the tests (it depends on information we calculate in pytest_generate_tests
), so if we have too many workers, we skip the redundant ones (as suggested here - https://stackoverflow.com/questions/33400071/skip-parametrized-tests-generated-by-pytest-generate-tests-at-module-level) and it works
Problem now is the exit code. For some reason, if I have some workers which returns exitstatus 0 (OK), and some workers which returns exitstatus 5 (NO_TESTS_COLLECTED), the general return code from the pytest run (from master) is 5 (where I want it to be 0, because all of the collected tests passed).
Is that a bug or the desired behavior? And if it’s the latter, any ideas to how can I accomplish the behavior I want?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
Depending on the setup, it’s potentially OK to just do it in pytest_configure
Do you mean to wrap the pytest command with a script retrieving the number of VM’s? If so, do we need to use
pytest.main
in this case (https://docs.pytest.org/en/stable/usage.html#calling-pytest-from-python-code)?