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

Function test_location_raises_invalid_index

tests/test_ProblemData.py:734–742  ·  view source on GitHub ↗

Tests that calling location(idx) raises when the index is out of bounds.

(ok_small, idx: int)

Source from the content-addressed store, hash-verified

732
733@pytest.mark.parametrize("idx", [5, 6])
734def test_location_raises_invalid_index(ok_small, idx: int):
735 """
736 Tests that calling location(idx) raises when the index is out of bounds.
737 """
738 assert_equal(ok_small.num_depots, 1)
739 assert_equal(ok_small.num_clients, 4)
740
741 with assert_raises(IndexError):
742 ok_small.location(idx)
743
744
745@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

locationMethod · 0.80

Tested by

no test coverage detected