def test_parse_time_separator_without_timespan(): with pytest.raises(ValueError): create_time_from_text('-')
def test_parse_time_invalid_string(): with pytest.raises(ValueError): create_time_from_text('foo')
def test_parse_time_out_of_range(duration): with pytest.raises(ValueError): create_time_from_text(duration)
def test_parse_time_valid_big_integer(): assert create_time_from_text('0900') == datetime.time(9, 0)