Skip to content

Commit d3274b1

Browse files
committed
Update the documentation
1 parent 91d600c commit d3274b1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/en/reference/reference.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,25 @@ passed multiple times. The expected format is ``name=value``. For example::
14841484
14851485
For more information please refer to :ref:`faulthandler`.
14861486

1487+
1488+
.. confval:: faulthandler_exit_on_timeout
1489+
1490+
Exit the pytest process after the per-test timeout is reached by passing
1491+
`exit=True` to the :func:`faulthandler.dump_traceback_later` function. This
1492+
is particularly useful to avoid wasting CI resources for test suites that
1493+
are prone to putting the main Python interpreter into a deadlock state.
1494+
1495+
This option is set to 'false' by default.
1496+
1497+
.. code-block:: ini
1498+
1499+
# content of pytest.ini
1500+
[pytest]
1501+
faulthandler_timeout=5
1502+
faulthandler_exit_on_timeout=true
1503+
1504+
For more information please refer to :ref:`faulthandler`.
1505+
14871506
.. confval:: filterwarnings
14881507

14891508

@@ -2401,6 +2420,9 @@ All the command-line flags can be obtained by running ``pytest --help``::
24012420
faulthandler_timeout (string):
24022421
Dump the traceback of all threads if a test takes
24032422
more than TIMEOUT seconds to finish
2423+
faulthandler_exit_on_timeout (bool):
2424+
Exit the test process if a test takes more than
2425+
faulthandler_timeout seconds to finish
24042426
addopts (args): Extra command line options
24052427
minversion (string): Minimally required pytest version
24062428
pythonpath (paths): Add paths to sys.path

0 commit comments

Comments
 (0)