From 0d5ed57b4096d5374be40c01208da700e359c28d Mon Sep 17 00:00:00 2001 From: Yash Todi Date: Sun, 4 Aug 2019 22:35:51 +0530 Subject: [PATCH] Added info to access exitcodes directly --- doc/en/usage.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/en/usage.rst b/doc/en/usage.rst index 41d51adee..cb99989eb 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -33,7 +33,11 @@ Running ``pytest`` can result in six different exit codes: :Exit code 4: pytest command line usage error :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 --------------------------------------------------------------