]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-53203: Improve tests for strptime() (GH-125090) (GH-125093)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 8 Oct 2024 09:47:37 +0000 (12:47 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 09:47:37 +0000 (09:47 +0000)
commit82257374b9d10bc3df2a466fe4450a5dc576842d
treed5c998761e38654cfc8ae389b239459b7a62a1ee
parentbc237ed9a8d631675a4962d6627d0571dfa4c04f
[3.12] gh-53203: Improve tests for strptime() (GH-125090) (GH-125093)

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.
(cherry picked from commit 19984fe024bfd90649f1c36b78c9abf3ed72b27d)
Lib/test/pickletester.py
Lib/test/support/__init__.py
Lib/test/test_codecs.py
Lib/test/test_decimal.py
Lib/test/test_float.py
Lib/test/test_imaplib.py
Lib/test/test_strptime.py
Lib/test/test_time.py
Lib/test/test_types.py
Lib/test/test_unicode.py