MCPcopy Create free account
hub / github.com/dbcli/mycli / test_format_uptime

Function test_format_uptime

test/pytests/test_special_utils.py:74–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73
74def test_format_uptime():
75 seconds = 59
76 assert '59 sec' == format_uptime(seconds)
77
78 seconds = 120
79 assert '2 min 0 sec' == format_uptime(seconds)
80
81 seconds = 54890
82 assert '15 hours 14 min 50 sec' == format_uptime(seconds)
83
84 seconds = 598244
85 assert '6 days 22 hours 10 min 44 sec' == format_uptime(seconds)
86
87 seconds = 522600
88 assert '6 days 1 hour 10 min 0 sec' == format_uptime(seconds)
89
90
91def test_format_uptime_uses_singular_units() -> None:

Callers

nothing calls this directly

Calls 1

format_uptimeFunction · 0.90

Tested by

no test coverage detected