Skip to content

Commit 5100c20

Browse files
committed
Add tests for upper case datetime parsing
1 parent 2f79461 commit 5100c20

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

graalpython/com.oracle.graal.python.test/src/tests/test_datetime.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,13 @@ def test_strptime(self):
603603
with self.assertRaisesRegex(ValueError, "Inconsistent use of : in \\+00:0000"):
604604
datetime.datetime.strptime("+00:0000", "%z")
605605

606+
with self.assertRaises(ValueError):
607+
datetime.datetime.strptime("APRIL 31", "%B %d")
608+
609+
actual = datetime.datetime.strptime("APRIL 30", "%B %d")
610+
expected = datetime.datetime(1900, 4, 30, 0, 0, 0)
611+
self.assertEqual(actual, expected)
612+
606613

607614
# ambiguity handling
608615

0 commit comments

Comments
 (0)