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

Function test_start

tests/test_ProgressPrinter.py:22–33  ·  view source on GitHub ↗

Tests that the progress printer outputs some statistics about the given instance when calling start.

(ok_small, caplog)

Source from the content-addressed store, hash-verified

20
21
22def test_start(ok_small, caplog):
23 """
24 Tests that the progress printer outputs some statistics about the given
25 instance when calling start.
26 """
27 printer = ProgressPrinter(should_print=True, display_interval=1.0)
28 printer.start(ok_small)
29
30 out = caplog.text
31 assert_(f"{ok_small.num_depots} depot" in out)
32 assert_(f"{ok_small.num_clients} clients" in out)
33 assert_(f"{ok_small.num_vehicles} vehicles" in out)
34
35
36def test_start_multiple_depot_plural(ok_small_multi_depot, caplog):

Callers

nothing calls this directly

Calls 2

startMethod · 0.95
ProgressPrinterClass · 0.90

Tested by

no test coverage detected