From c7f06717462f20ee7829f42f1ea41a8becac3edc Mon Sep 17 00:00:00 2001 From: Michael Twomey Date: Fri, 18 Oct 2013 17:07:54 +0100 Subject: Added testcase from https://code.google.com/p/pyiso8601/issues/detail?id=14 --- iso8601/test_iso8601.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iso8601/test_iso8601.py b/iso8601/test_iso8601.py index d684bd2..30d6a1d 100644 --- a/iso8601/test_iso8601.py +++ b/iso8601/test_iso8601.py @@ -34,6 +34,8 @@ def test_parse_utc_different_default(): ("23",), ("131015T142533Z",), ("131015",), + ("2007-06-23X06:40:34.00Z", ), # https://code.google.com/p/pyiso8601/issues/detail?id=14 + ("2007-06-23 06:40:34.00Zrubbish", ), # https://code.google.com/p/pyiso8601/issues/detail?id=14 ]) def test_parse_invalid_date(invalid_date): with pytest.raises(iso8601.ParseError) as exc: @@ -51,6 +53,7 @@ def test_parse_invalid_date(invalid_date): ("2013-10-15T18:30Z", datetime.datetime(2013, 10, 15, 18, 30, 0, 0, iso8601.UTC)), ("2013-10-15T22:30+04", datetime.datetime(2013, 10, 15, 22, 30, 0, 0, iso8601.FixedOffset(4, 0, "+04:00"))), #