mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
[3.13] gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406) (GH-125454)
Fixed most locales that use non-ASCII digits, like Persian, Burmese,
Odia and Shan.
(cherry picked from commit 5f4e5b598c
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
7966c7d69e
commit
cbcdf34a4b
4 changed files with 77 additions and 43 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