Skip to content

Commit d0e6a1f

Browse files
Cover the majority
1 parent a0b0f07 commit d0e6a1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/datetimetester.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2917,7 +2917,11 @@ def test_strptime(self):
29172917
with self.assertRaises(ValueError): strptime("z", "%z")
29182918

29192919
# test only ascii is allowed
2920-
with self.assertRaises(ValueError): strptime('٢025-03-09', '%Y-%m-%d')
2920+
with self.assertRaises(ValueError): strptime('٢025-0٢-٢9', '%Y-%m-%d')
2921+
with self.assertRaises(ValueError): strptime('1٢:02:٢7', '%H:%M:%S')
2922+
with self.assertRaises(ValueError): strptime('٢5', '%y')
2923+
with self.assertRaises(ValueError): strptime('٢555', '%G')
2924+
with self.assertRaises(ValueError): strptime('٢/03 0٢a٢', '%j/%y %I%p:%M:%S')
29212925

29222926
def test_strptime_single_digit(self):
29232927
# bpo-34903: Check that single digit dates and times are allowed.

0 commit comments

Comments
 (0)