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

Function test_raise_negative_parameters

tests/stop/test_MaxRuntime.py:9–14  ·  view source on GitHub ↗

Maximum runtime may not be negative.

(max_runtime: float)

Source from the content-addressed store, hash-verified

7
8@mark.parametrize("max_runtime", [-0.001, -1, -10.1])
9def test_raise_negative_parameters(max_runtime: float):
10 """
11 Maximum runtime may not be negative.
12 """
13 with assert_raises(ValueError):
14 MaxRuntime(max_runtime)
15
16
17@mark.parametrize("max_runtime", [0.001, 1, 10.1])

Callers

nothing calls this directly

Calls 1

MaxRuntimeClass · 0.90

Tested by

no test coverage detected