Tests that the constructor raises when given a visits list that contains invalid clients.
(ok_small)
| 19 | |
| 20 | |
| 21 | def 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 | |
| 36 | def test_trip_defaults_to_vehicle_start_end_depots(ok_small_multi_depot): |