Tests that after the max runtime has passed, ``MaxRuntime`` stops.
(max_runtime)
| 36 | |
| 37 | @mark.parametrize("max_runtime", [0.01, 0.05, 0.10]) |
| 38 | def test_after_max_runtime(max_runtime): |
| 39 | """ |
| 40 | Tests that after the max runtime has passed, ``MaxRuntime`` stops. |
| 41 | """ |
| 42 | stop = MaxRuntime(max_runtime) |
| 43 | assert_(not stop(1)) # trigger the first time measurement |
| 44 | |
| 45 | sleep(max_runtime) |
| 46 | |
| 47 | for _ in range(100): |
| 48 | assert_(stop(1)) |
nothing calls this directly
no test coverage detected