@@ -366,14 +366,25 @@ You can also set the session timeout the pytest configuration file using the ``s
366366 Cooperative timeouts
367367-----------------
368368
369- Session timeouts are cooperative timeouts. The plugin checks the session time at the end of
370- each test function, and stops further tests from running if the session timeout is exceeded.
369+ Session timeouts are cooperative timeouts. pytest-timeout checks the
370+ session time at the end of each test function, and stops further tests
371+ from running if the session timeout is exceeded. The session will
372+ results in a test failure if this occurs.
373+
374+ In particular this means if a test does not finish of itself, it will
375+ only be interrupted if there is also a function timeout set. A
376+ session timeout is not enough to ensure that a test-suite is
377+ guaranteed to finish.
371378
372379Combining session and function timeouts
373380---------------------------------------
374381
375- It works fine to combine both session and function timeouts.
376- For example, to limit test functions to 5 seconds and the full session to 100 seconds::
382+ It works fine to combine both session and function timeouts. In fact
383+ when using a session timeout it is recommended to also provide a
384+ function timeout.
385+
386+ For example, to limit test functions to 5 seconds and the full session
387+ to 100 seconds::
377388
378389 pytest --timeout=5 --session-timeout=100
379390
@@ -392,6 +403,7 @@ Unreleased
392403 Thanks Pedro Algarvio.
393404- Pytest 7.0.0 is now the minimum supported version. Thanks Pedro Algarvio.
394405- Add ``--session-timeout `` option and ``session_timeout `` setting.
406+ Thanks Brian Okken.
395407
3964082.2.0
397409-----
0 commit comments