diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-10-08 11:40:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 08:40:02 +0000 |
commit | 19984fe024bfd90649f1c36b78c9abf3ed72b27d (patch) | |
tree | 71518f45b3db2d8ccaaaffb03151c27006c89839 /Lib/test/pickletester.py | |
parent | 7c4b6a68f263320a2dd19cd5ff63b35c964b1fa8 (diff) | |
download | cpython-19984fe024bfd90649f1c36b78c9abf3ed72b27d.tar.gz cpython-19984fe024bfd90649f1c36b78c9abf3ed72b27d.zip |
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.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r-- | Lib/test/pickletester.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 1722cc8612c..8ef8fae44f1 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -26,7 +26,7 @@ except ImportError: from test import support from test.support import os_helper from test.support import ( - TestFailed, run_with_locale, no_tracing, + TestFailed, run_with_locales, no_tracing, _2G, _4G, bigmemtest ) from test.support.import_helper import forget @@ -2895,7 +2895,7 @@ class AbstractPickleTests: got = self.loads(pickle) self.assert_is_copy(value, got) - @run_with_locale('LC_ALL', 'de_DE', 'fr_FR') + @run_with_locales('LC_ALL', 'de_DE', 'fr_FR', '') def test_float_format(self): # make sure that floats are formatted locale independent with proto 0 self.assertEqual(self.dumps(1.2, 0)[0:3], b'F1.') |