Tests that the ``ProblemData`` constructor raises a ``ValueError`` when the distance or duration matrix has a non-zero value on the diagonal.
(dist_mat, dur_mat)
| 267 | ], |
| 268 | ) |
| 269 | def test_problem_data_raises_matrix_diagonal_nonzero(dist_mat, dur_mat): |
| 270 | """ |
| 271 | Tests that the ``ProblemData`` constructor raises a ``ValueError`` when |
| 272 | the distance or duration matrix has a non-zero value on the diagonal. |
| 273 | """ |
| 274 | clients = [Client(x=0, y=0)] |
| 275 | depots = [Depot(x=0, y=0)] |
| 276 | vehicle_types = [VehicleType()] |
| 277 | |
| 278 | with assert_raises(ValueError): |
| 279 | ProblemData(clients, depots, vehicle_types, [dist_mat], [dur_mat]) |
| 280 | |
| 281 | |
| 282 | def test_problem_data_replace_no_changes(): |
nothing calls this directly
no test coverage detected