@@ -3259,6 +3259,9 @@ def test_fromisoformat_datetime_examples(self):
3259
3259
('2025-01-02T03:04:05,678+00:00:10' ,
3260
3260
self .theclass (2025 , 1 , 2 , 3 , 4 , 5 , 678000 ,
3261
3261
tzinfo = timezone (timedelta (seconds = 10 )))),
3262
+ ('2025-01-02T24:00:00' , self .theclass (2025 , 1 , 3 , 0 , 0 , 0 )),
3263
+ ('2025-01-31T24:00:00' , self .theclass (2025 , 2 , 1 , 0 , 0 , 0 )),
3264
+ ('2025-12-31T24:00:00' , self .theclass (2026 , 1 , 1 , 0 , 0 , 0 ))
3262
3265
]
3263
3266
3264
3267
for input_str , expected in examples :
@@ -3295,6 +3298,9 @@ def test_fromisoformat_fails_datetime(self):
3295
3298
'2009-04-19T12:30:45.123456-05:00a' , # Extra text
3296
3299
'2009-04-19T12:30:45.123-05:00a' , # Extra text
3297
3300
'2009-04-19T12:30:45-05:00a' , # Extra text
3301
+ '2009-04-19T24:00:00.000001' , # Has non-zero microseconds on 24:00
3302
+ '2009-04-19T24:00:01.000000' , # Has non-zero seconds on 24:00
3303
+ '2009-04-19T24:01:00.000000' , # Has non-zero minutes on 24:00
3298
3304
]
3299
3305
3300
3306
for bad_str in bad_strs :
0 commit comments