Skip to content

Commit 57ee9b7

Browse files
Chaim-Leib Halbertbrianjmiller
authored andcommitted
added test for naive timestamp
1 parent 32537ff commit 57ee9b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/conversions/iso8601_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ def test_bad_iso_to_timedelta(self):
410410
# used '#' instead of '-'
411411
make_datetime('2014-06-19T17:03#17.361077-05:00')
412412

413+
with self.assertRaises(ValueError):
414+
# naive timestamps raise ValueError
415+
make_datetime('2014-06-19T16:40:22.293913')
416+
417+
413418
def test_bad_timedelta_to_iso(self):
414419
with self.assertRaises(AssertionError):
415420
jsonify_datetime('2014-06-19T17:03:17.361077-05:00')

0 commit comments

Comments
 (0)