Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5100c20

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

1 file changed

+7Lines changed: 7 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: graalpython/com.oracle.graal.python.test/src/tests/test_datetime.py
+7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.