Beispiel #1
0
def test_raise_value_error():
    """Test for negative time value (raises a ValueError)."""
    utils.write_time(-1)
Beispiel #2
0
def test_convert_3659():
    """Convert 3659."""
    assert utils.write_time(3659) == '01h:00m:59s'
Beispiel #3
0
def test_convert_3661():
    """Convert 3661."""
    assert utils.write_time(3661) == '01h:01m:01s'
Beispiel #4
0
def test_convert_3600():
    """Convert 3600."""
    assert utils.write_time(3600) == '01h:00m:00s'
Beispiel #5
0
def test_convert_2100():
    """Convert 2100."""
    assert utils.write_time(2100) == '35m:00s'
Beispiel #6
0
def test_convert_0():
    """Convert 0."""
    assert utils.write_time(0) == '00s'
Beispiel #7
0
def test_convert_wrong_data_type():
    """Convert None."""
    assert utils.write_time('string')
    assert utils.write_time((1, 2))
    assert utils.write_time([1, 2])
    assert utils.write_time({'time': 25})
Beispiel #8
0
def test_convert_none():
    """Convert None."""
    assert utils.write_time(None)