MCPcopy Create free account
hub / github.com/dask/dask / test_format_time

Function test_format_time

dask/diagnostics/tests/test_progress.py:64–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def test_format_time():
65 with pytest.warns(FutureWarning, match="dask.utils.format_time") as record:
66 assert format_time(1.4) == " 1.4s"
67 assert format_time(10.4) == "10.4s"
68 assert format_time(100.4) == " 1min 40.4s"
69 assert format_time(1000.4) == "16min 40.4s"
70 assert format_time(10000.4) == " 2hr 46min 40.4s"
71
72 assert len(record) == 5 # Each `assert` above warns
73
74
75def test_register(capsys):

Callers

nothing calls this directly

Calls 1

format_timeFunction · 0.90

Tested by

no test coverage detected