Tests access to the ``num_iterations`` property.
(ok_small, num_iterations: int)
| 50 | |
| 51 | @pytest.mark.parametrize("num_iterations", [0, 1, 10]) |
| 52 | def 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( |
nothing calls this directly
no test coverage detected