document exitcode members

This commit is contained in:
Ronny Pfannschmidt 2019-06-15 17:18:21 +02:00
parent 065fa17124
commit 103d6146b0
2 changed files with 18 additions and 2 deletions

View File

@ -727,6 +727,14 @@ ExceptionInfo
.. autoclass:: _pytest._code.ExceptionInfo
:members:
pytest.ExitCode
~~~~~~~~~~~~~~~
.. autoclass:: _pytest.main.ExitCode
:members:
FixtureDef
~~~~~~~~~~

View File

@ -19,15 +19,23 @@ from _pytest.deprecated import PYTEST_CONFIG_GLOBAL
from _pytest.outcomes import exit
from _pytest.runner import collect_one_node
# exitcodes for the command line
class ExitCode(enum.IntEnum):
"""
encodes the valid exit codes of pytest
currently users may still supply other exit codes as well
"""
#: tests passed
OK = 0
#: tests failed
TESTS_FAILED = 1
#: pytest was interrupted
INTERRUPTED = 2
#: an internal error got in the way
INTERNAL_ERROR = 3
#: pytest was missused
USAGE_ERROR = 4
#: pytest couldnt find tests
NO_TESTS_COLLECTED = 5