MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / test_before_max_runtime

Function test_before_max_runtime

tests/stop/test_MaxRuntime.py:26–34  ·  view source on GitHub ↗

Tests that ``MaxRuntime`` does not stop *before* the given runtime has passed.

(max_runtime)

Source from the content-addressed store, hash-verified

24
25@mark.parametrize("max_runtime", [0.01, 0.05, 0.10])
26def 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])

Callers

nothing calls this directly

Calls 1

MaxRuntimeClass · 0.90

Tested by

no test coverage detected