MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / test_str

Function test_str

tests/test_DurationSegment.py:166–185  ·  view source on GitHub ↗

Tests that the duration segment's string representation contains useful debugging information.

()

Source from the content-addressed store, hash-verified

164
165
166def test_str():
167 """
168 Tests that the duration segment's string representation contains useful
169 debugging information.
170 """
171 segment = DurationSegment(
172 duration=2,
173 time_warp=3,
174 start_early=5,
175 start_late=7,
176 release_time=6,
177 prev_end_late=3,
178 )
179
180 assert_("duration=5" in str(segment)) # incl prev_end_late to release_time
181 assert_("time_warp=3" in str(segment))
182 assert_("start_early=6" in str(segment)) # max(start_early, release_time)
183 assert_("start_late=7" in str(segment))
184 assert_("release_time=6" in str(segment))
185 assert_("prev_end_late=3" in str(segment))
186
187
188def test_finalise_back_with_time_warp_from_release_time():

Callers

nothing calls this directly

Calls 1

DurationSegmentClass · 0.85

Tested by

no test coverage detected