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

Function test_add_edge

tests/test_Model.py:139–151  ·  view source on GitHub ↗

Smoke test that checks edge attributes are the same as what was passed in.

()

Source from the content-addressed store, hash-verified

137
138
139def test_add_edge():
140 """
141 Smoke test that checks edge attributes are the same as what was passed in.
142 """
143 model = Model()
144 depot = model.add_depot(0, 0)
145 client = model.add_client(0, 1)
146 edge = model.add_edge(depot, client, distance=15, duration=49)
147
148 assert_(edge.frm is depot)
149 assert_(edge.to is client)
150 assert_equal(edge.distance, 15)
151 assert_equal(edge.duration, 49)
152
153
154def test_add_vehicle_type():

Callers

nothing calls this directly

Calls 4

add_depotMethod · 0.95
add_clientMethod · 0.95
add_edgeMethod · 0.95
ModelClass · 0.90

Tested by

no test coverage detected