Skip to content

Commit a355855

Browse files
committed
Test that year 0 with a 24:00 time rolls over into year 1
1 parent d2e66d4 commit a355855

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Lib/test/datetimetester.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4033,7 +4033,8 @@ def test_fromisoformat_datetime_examples(self):
40334033
tzinfo=timezone(timedelta(seconds=10)))),
40344034
('2025-01-02T24:00:00', self.theclass(2025, 1, 3, 0, 0, 0)),
40354035
('2025-01-31T24:00:00', self.theclass(2025, 2, 1, 0, 0, 0)),
4036-
('2025-12-31T24:00:00', self.theclass(2026, 1, 1, 0, 0, 0))
4036+
('2025-12-31T24:00:00', self.theclass(2026, 1, 1, 0, 0, 0)),
4037+
('0000-12-31T24:00:00', self.theclass(1, 1, 1, 0, 0, 0)),
40374038
]
40384039

40394040
for input_str, expected in examples:

0 commit comments

Comments
 (0)