Skip to content

Commit

Permalink
parse datetime edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Jan 13, 2023
1 parent 44ddd3e commit 28115e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/times_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ def test_parse_datetime_no_tz(self):
assert dt.resolution == DateTimeResolution.datetime
assert dt.dt == datetime.datetime(1997, 7, 16, 7, 30, 15)

def test_parse_datetime_empty(self):
assert KmlDateTime.parse("") is None

def test_parse_year_month_5(self):
"""Test that a single digit month is invalid."""
assert KmlDateTime.parse("19973") is None


class TestStdLibrary(StdLibrary):
"""Test with the standard library."""
Expand Down

0 comments on commit 28115e1

Please sign in to comment.