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

Function test_num_iterations

tests/test_Result.py:52–60  ·  view source on GitHub ↗

Tests access to the ``num_iterations`` property.

(ok_small, num_iterations: int)

Source from the content-addressed store, hash-verified

50
51@pytest.mark.parametrize("num_iterations", [0, 1, 10])
52def test_num_iterations(ok_small, num_iterations: int):
53 """
54 Tests access to the ``num_iterations`` property.
55 """
56 rng = RandomNumberGenerator(seed=42)
57 stats = Statistics()
58 best = Solution.make_random(ok_small, rng)
59 res = Result(best, stats, num_iterations, 0.0)
60 assert_equal(res.num_iterations, num_iterations)
61
62
63@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

StatisticsClass · 0.90
ResultClass · 0.90

Tested by

no test coverage detected