示例#1
0
def test_parse_time_separator_without_timespan():
    with pytest.raises(ValueError):
        create_time_from_text('-')
示例#2
0
def test_parse_time_invalid_string():
    with pytest.raises(ValueError):
        create_time_from_text('foo')
示例#3
0
def test_parse_time_out_of_range(duration):
    with pytest.raises(ValueError):
        create_time_from_text(duration)
示例#4
0
def test_parse_time_valid_big_integer():
    assert create_time_from_text('0900') == datetime.time(9, 0)
示例#5
0
def test_parse_time_separator_without_timespan():
    with pytest.raises(ValueError):
        create_time_from_text('-')
示例#6
0
def test_parse_time_out_of_range(duration):
    with pytest.raises(ValueError):
        create_time_from_text(duration)
示例#7
0
def test_parse_time_invalid_string():
    with pytest.raises(ValueError):
        create_time_from_text('foo')
示例#8
0
def test_parse_time_valid_big_integer():
    assert create_time_from_text('0900') == datetime.time(9, 0)