MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / test_raises_empty_group

Function test_raises_empty_group

tests/test_ProblemData.py:826–838  ·  view source on GitHub ↗

Tests that passing an empty client group raises a ValueError.

()

Source from the content-addressed store, hash-verified

824
825
826def test_raises_empty_group():
827 """
828 Tests that passing an empty client group raises a ValueError.
829 """
830 with assert_raises(ValueError):
831 ProblemData(
832 clients=[],
833 depots=[Depot(1, 1)],
834 vehicle_types=[VehicleType()],
835 distance_matrices=[[[0]]],
836 duration_matrices=[[[0]]],
837 groups=[ClientGroup()], # empty group - this should raise
838 )
839
840
841@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

ProblemDataClass · 0.90
DepotClass · 0.90
VehicleTypeClass · 0.90
ClientGroupClass · 0.90

Tested by

no test coverage detected