Currently there's some inconsistency on which exit code is returned by pytest when import errors happen during startup.
example 1
# contents of conftest.py
raise ImportError
# contents of test_foo.py
def test_foo():
pass
Running py.test in this directory produces error code 4 - EXIT_USAGEERROR.
example 2
# contents of conftest.py
pytest_plugins = 'plugin'
# contents of plugin.py
raise ImportError
# contents of test_foo.py
def test_foo():
pass
Here py.test produces error code 1 - EXIT_TESTSFAILED.
Shouldn't they all return the same error code? Furthermore, shouldn't the error code be 3 - EXIT_INTERNALERROR instead?
Currently there's some inconsistency on which exit code is returned by pytest when import errors happen during startup.
example 1
Running
py.testin this directory produces error code4 - EXIT_USAGEERROR.example 2
Here
py.testproduces error code1 - EXIT_TESTSFAILED.Shouldn't they all return the same error code? Furthermore, shouldn't the error code be
3 - EXIT_INTERNALERRORinstead?