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

Function test_raises_invalid_clients

tests/test_Trip.py:21–33  ·  view source on GitHub ↗

Tests that the constructor raises when given a visits list that contains invalid clients.

(ok_small)

Source from the content-addressed store, hash-verified

19
20
21def test_raises_invalid_clients(ok_small):
22 """
23 Tests that the constructor raises when given a visits list that contains
24 invalid clients.
25 """
26 assert_equal(ok_small.num_depots, 1)
27 assert_equal(ok_small.num_clients, 4)
28
29 with assert_raises(ValueError):
30 Trip(ok_small, [0], 0)
31
32 with assert_raises(ValueError):
33 Trip(ok_small, [5], 0)
34
35
36def test_trip_defaults_to_vehicle_start_end_depots(ok_small_multi_depot):

Callers

nothing calls this directly

Calls 1

TripClass · 0.90

Tested by

no test coverage detected