Tests that ``MaxRuntime`` does not stop *before* the given runtime has passed.
(max_runtime)
| 24 | |
| 25 | @mark.parametrize("max_runtime", [0.01, 0.05, 0.10]) |
| 26 | def test_before_max_runtime(max_runtime): |
| 27 | """ |
| 28 | Tests that ``MaxRuntime`` does not stop *before* the given runtime has |
| 29 | passed. |
| 30 | """ |
| 31 | stop = MaxRuntime(max_runtime) |
| 32 | |
| 33 | for _ in range(100): |
| 34 | assert_(not stop(1)) |
| 35 | |
| 36 | |
| 37 | @mark.parametrize("max_runtime", [0.01, 0.05, 0.10]) |