Tests that the stopping criterion allows iterations if the maximum runtime has not yet been violated.
(max_runtime)
| 28 | |
| 29 | @mark.parametrize("max_runtime", [0.01, 0.05, 0.10]) |
| 30 | def test_before_max_runtime(max_runtime): |
| 31 | """ |
| 32 | Tests that the stopping criterion allows iterations if the maximum runtime |
| 33 | has not yet been violated. |
| 34 | """ |
| 35 | stop = MultipleCriteria([MaxIterations(101), MaxRuntime(max_runtime)]) |
| 36 | |
| 37 | for _ in range(100): |
| 38 | assert_(not stop(1)) |
| 39 | |
| 40 | |
| 41 | @mark.parametrize("max_runtime", [0.01, 0.05, 0.10]) |
nothing calls this directly
no test coverage detected