MCPcopy Index your code
hub / github.com/PyVRP/PyVRP / test_depot_initialises_data_correctly

Function test_depot_initialises_data_correctly

tests/test_ProblemData.py:164–183  ·  view source on GitHub ↗

Tests that the depot constructor correctly initialises its member data, and ensures the data is accessible from Python.

()

Source from the content-addressed store, hash-verified

162
163
164def 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
186def test_problem_data_raises_when_no_depot_is_provided():

Callers

nothing calls this directly

Calls 1

DepotClass · 0.90

Tested by

no test coverage detected