Tests the equality operator.
(ok_small, num_iterations: int)
| 75 | |
| 76 | @pytest.mark.parametrize("num_iterations", [0, 1, 10]) |
| 77 | def test_eq(ok_small, num_iterations: int): |
| 78 | """ |
| 79 | Tests the equality operator. |
| 80 | """ |
| 81 | sol = Solution(ok_small, [[1, 2], [3, 4]]) |
| 82 | cost_eval = CostEvaluator([20], 6, 6) |
| 83 | |
| 84 | stats = Statistics() |
| 85 | for _ in range(num_iterations): # populate the statistics object |
| 86 | stats.collect(sol, sol, sol, cost_eval) |
| 87 | |
| 88 | assert_equal(stats, stats) |
| 89 | assert_(stats != "test") |
| 90 | |
| 91 | if num_iterations > 0: |
| 92 | assert_(stats != Statistics()) |
| 93 | |
| 94 | |
| 95 | def test_more_eq(ok_small): |
nothing calls this directly
no test coverage detected