Tests that loads are calculated correctly when there's an initial load present on the vehicle.
(ok_small)
| 831 | |
| 832 | |
| 833 | def test_initial_load_calculation(ok_small): |
| 834 | """ |
| 835 | Tests that loads are calculated correctly when there's an initial load |
| 836 | present on the vehicle. |
| 837 | """ |
| 838 | orig_route = Route(ok_small, 0, 0) |
| 839 | assert_equal(orig_route.load(), [0]) |
| 840 | |
| 841 | veh_type = ok_small.vehicle_type(0) |
| 842 | new_type = veh_type.replace(initial_load=[5]) |
| 843 | new_data = ok_small.replace(vehicle_types=[new_type]) |
| 844 | |
| 845 | new_route = Route(new_data, 0, 0) |
| 846 | assert_equal(new_route.load(), [5]) |
| 847 | |
| 848 | |
| 849 | def test_multi_trip_depots(ok_small_multiple_trips): |