@@ -344,9 +344,15 @@ function:
344
344
Session Timeout
345
345
===============
346
346
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)::
350
356
351
357
pytest --session-timeout=600
352
358
@@ -357,14 +363,14 @@ You can also set the session timeout the pytest configuration file using the ``s
357
363
[pytest]
358
364
session_timeout = 600
359
365
360
- Friendly timeouts
366
+ Cooperative timeouts
361
367
-----------------
362
368
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
364
370
each test function, and stops further tests from running if the session timeout is exceeded.
365
371
366
- Combining session and function
367
- ------------------------------
372
+ Combining session and function timeouts
373
+ ---------------------------------------
368
374
369
375
It works fine to combine both session and function timeouts.
370
376
For example, to limit test functions to 5 seconds and the full session to 100 seconds::
0 commit comments