def test_display_inf(): assert _display_time(inf) == (1, "infinity")
def test_display_days(): assert _display_time(36.0 * 60.0 * 60.0 + 0.1) == (2, "days") assert _display_time(78 * 60.0 * 60.0) == (4, "days")
def test_display_minutes(): assert _display_time(90.1) == (2, "minutes") assert _display_time(120.1) == (3, "minutes") assert _display_time(90.0 * 60.0) == (90, "minutes")
def test_display_hours(): assert _display_time(90.0 * 60.0 + 0.1) == (2, "hours") assert _display_time(36.0 * 60.0 * 60.0) == (36, "hours")
def test_display_seconds(): assert _display_time(0.8) == (1, "second") assert _display_time(1.0) == (1, "second") assert _display_time(90.0) == (90, "seconds")