mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406)
Fixed most locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan.
This commit is contained in:
parent
06ca33020e
commit
5f4e5b598c
4 changed files with 66 additions and 40 deletions
|
|
@ -298,7 +298,7 @@ class TimeTestCase(unittest.TestCase):
|
|||
# additional check for IndexError branch (issue #19545)
|
||||
with self.assertRaises(ValueError) as e:
|
||||
time.strptime('19', '%Y %')
|
||||
self.assertIs(e.exception.__suppress_context__, True)
|
||||
self.assertIsNone(e.exception.__context__)
|
||||
|
||||
def test_strptime_leap_year(self):
|
||||
# GH-70647: warns if parsing a format with a day and no year.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue