コード例 #1
0
def test_display_inf():
    assert _display_time(inf) == (1, "infinity")
コード例 #2
0
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")
コード例 #3
0
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")
コード例 #4
0
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")
コード例 #5
0
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")