Tests that groups with client indices that are either depots or outside the range of client locations results in an IndexError.
(groups: list[ClientGroup])
| 868 | "groups", [[ClientGroup([0, 1])], [ClientGroup([1, 2])]] |
| 869 | ) |
| 870 | def test_raises_invalid_group_client_indices(groups: list[ClientGroup]): |
| 871 | """ |
| 872 | Tests that groups with client indices that are either depots or outside the |
| 873 | range of client locations results in an IndexError. |
| 874 | """ |
| 875 | with assert_raises(IndexError): |
| 876 | ProblemData( |
| 877 | clients=[Client(1, 1, required=False, group=0)], |
| 878 | depots=[Depot(1, 1)], |
| 879 | vehicle_types=[VehicleType()], |
| 880 | distance_matrices=[np.zeros((2, 2))], |
| 881 | duration_matrices=[np.zeros((2, 2))], |
| 882 | groups=groups, |
| 883 | ) |
| 884 | |
| 885 | |
| 886 | def test_raises_wrong_mutual_group_referencing(): |
nothing calls this directly
no test coverage detected