示例#1
0
def test_parse_iso8601(string, expected):
    result = parse_iso8601(string)
    assert result == expected

    with pytest.raises(ValueError):
        parse_iso8601(string + '3')
        parse_iso8601(string + '.3')
示例#2
0
def test_parse_iso8601(string, expected):
    result = parse_iso8601(string)
    assert result == expected

    with pytest.raises(ValueError):
        parse_iso8601(string + '3')
        parse_iso8601(string + '.3')