Added info to access exitcodes directly
This commit is contained in:
parent
0d3958e8de
commit
0d5ed57b40
|
@ -33,7 +33,11 @@ Running ``pytest`` can result in six different exit codes:
|
||||||
:Exit code 4: pytest command line usage error
|
:Exit code 4: pytest command line usage error
|
||||||
:Exit code 5: No tests were collected
|
:Exit code 5: No tests were collected
|
||||||
|
|
||||||
They are represented by the :class:`_pytest.main.ExitCode` enum.
|
They are represented by the :class:`_pytest.main.ExitCode` enum. The exit codes being a part of the public API can be imported and accessed directly using:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from pytest import ExitCode
|
||||||
|
|
||||||
Getting help on version, option names, environment variables
|
Getting help on version, option names, environment variables
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue