Tests that the depot constructor correctly initialises its member data, and ensures the data is accessible from Python.
()
| 162 | |
| 163 | |
| 164 | def test_depot_initialises_data_correctly(): |
| 165 | """ |
| 166 | Tests that the depot constructor correctly initialises its member data, and |
| 167 | ensures the data is accessible from Python. |
| 168 | """ |
| 169 | depot = Depot( |
| 170 | x=1.25, |
| 171 | y=0.5, |
| 172 | tw_early=5, |
| 173 | tw_late=7, |
| 174 | service_duration=3, |
| 175 | name="test", |
| 176 | ) |
| 177 | |
| 178 | assert_equal(depot.x, 1.25) |
| 179 | assert_equal(depot.y, 0.5) |
| 180 | assert_equal(depot.tw_early, 5) |
| 181 | assert_equal(depot.tw_late, 7) |
| 182 | assert_equal(depot.service_duration, 3) |
| 183 | assert_equal(depot.name, "test") |
| 184 | |
| 185 | |
| 186 | def test_problem_data_raises_when_no_depot_is_provided(): |