MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / test_client_group_raises_duplicate_clients

Function test_client_group_raises_duplicate_clients

tests/test_ProblemData.py:938–949  ·  view source on GitHub ↗

Tests that adding the same client to a group more than once raises.

()

Source from the content-addressed store, hash-verified

936
937
938def test_client_group_raises_duplicate_clients():
939 """
940 Tests that adding the same client to a group more than once raises.
941 """
942 with assert_raises(ValueError):
943 ClientGroup([1, 1])
944
945 group = ClientGroup()
946 group.add_client(1) # this should be OK
947
948 with assert_raises(ValueError):
949 group.add_client(1) # but adding the client a second time is not
950
951
952def test_replacing_client_groups(ok_small):

Callers

nothing calls this directly

Calls 2

ClientGroupClass · 0.90
add_clientMethod · 0.80

Tested by

no test coverage detected