August 2018
Beginner
160 pages
4h 8m
English
The pytest-timeout plugin terminates tests automatically after they reach a certain timeout.
You use it by setting a global timeout in the command-line:
λ pytest --timeout=60
Or you can mark individual tests with the @pytest.mark.timeout mark:
@pytest.mark.timeout(600)def test_long_simulation(): ...
It works by using one of the two following methods to implement its timeout mechanism:
Read now
Unlock full access