Skip to content

Commit

Permalink
Add (passing) test case for three digit years. Closes #14.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtraschke committed Nov 3, 2024
1 parent f40f6f7 commit 0acc97b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyrfc3339/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def test_generate_local_parse_utc(self):
dt2 = parse(generate(dt1, utc=False, microseconds=True))
self.assertEqual(dt1, dt2)

def test_three_digit_year(self):
dt = datetime(999,1,1,0,0,0, tzinfo=timezone.utc)
self.assertEqual(generate(dt), "0999-01-01T00:00:00Z")


class TestExhaustiveRoundtrip(unittest.TestCase):
"""
Expand Down

0 comments on commit 0acc97b

Please sign in to comment.