Skip to content

Commit 73e0bf9

Browse files
authored
Merge pull request #5694 from yashtodi94/public_access_to_exitcode_doc_change
Added info to access exitcodes directly
2 parents 0d3958e + 0d5ed57 commit 73e0bf9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/en/usage.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ Running ``pytest`` can result in six different exit codes:
3333
:Exit code 4: pytest command line usage error
3434
:Exit code 5: No tests were collected
3535

36-
They are represented by the :class:`_pytest.main.ExitCode` enum.
36+
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:
37+
38+
.. code-block:: python
39+
40+
from pytest import ExitCode
3741
3842
Getting help on version, option names, environment variables
3943
--------------------------------------------------------------

0 commit comments

Comments
 (0)