@@ -344,9 +344,15 @@ function:
344344 Session Timeout
345345===============
346346
347- The above mentioned timeouts are all per test function. You can also set a
348- session timeout in seconds. The following example shows a session timeout
349- of 10 minutes (600 seconds)::
347+ The above mentioned timeouts are all per test function.
348+ The "per test function" timeouts will stop an individual test
349+ from taking too long. We may also want to limit the time of the entire
350+ set of tests running in one session. A session all of the tests
351+ that will be run with one invokation of pytest.
352+
353+ A session timeout is set with `--session-timeout ` and is in seconds.
354+
355+ The following example shows a session timeout of 10 minutes (600 seconds)::
350356
351357 pytest --session-timeout=600
352358
@@ -357,14 +363,14 @@ You can also set the session timeout the pytest configuration file using the ``s
357363 [pytest]
358364 session_timeout = 600
359365
360- Friendly timeouts
366+ Cooperative timeouts
361367-----------------
362368
363- Session timeouts are "friendly" timeouts. The plugin checks the session time at the end of
369+ Session timeouts are cooperative timeouts. The plugin checks the session time at the end of
364370each test function, and stops further tests from running if the session timeout is exceeded.
365371
366- Combining session and function
367- ------------------------------
372+ Combining session and function timeouts
373+ ---------------------------------------
368374
369375It works fine to combine both session and function timeouts.
370376For example, to limit test functions to 5 seconds and the full session to 100 seconds::
0 commit comments