mirror of
https://github.com/python/cpython.git
synced 2025-10-21 06:02:21 +00:00
gh-53203: Improve tests for strptime() (GH-125090)
Run them with different locales and different date and time. Add the @run_with_locales() decorator to run the test with multiple locales. Improve the run_with_locale() context manager/decorator -- it now catches only expected exceptions and reports the test as skipped if no appropriate locale is available.
This commit is contained in:
parent
7c4b6a68f2
commit
19984fe024
10 changed files with 198 additions and 83 deletions
|
@ -57,7 +57,7 @@ class TestImaplib(unittest.TestCase):
|
|||
timezone(timedelta(0, 2 * 60 * 60))),
|
||||
'"18-May-2033 05:33:20 +0200"']
|
||||
|
||||
@run_with_locale('LC_ALL', 'de_DE', 'fr_FR')
|
||||
@run_with_locale('LC_ALL', 'de_DE', 'fr_FR', '')
|
||||
# DST rules included to work around quirk where the Gnu C library may not
|
||||
# otherwise restore the previous time zone
|
||||
@run_with_tz('STD-1DST,M3.2.0,M11.1.0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue