mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[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 19984fe024
)
This commit is contained in:
parent
bc237ed9a8
commit
82257374b9
10 changed files with 199 additions and 84 deletions
|
@ -1242,7 +1242,7 @@ class FormatTest:
|
|||
self.assertEqual(get_fmt(Decimal('-1.5'), dotsep_wide, '020n'),
|
||||
'-0\u00b4000\u00b4000\u00b4000\u00b4001\u00bf5')
|
||||
|
||||
@run_with_locale('LC_ALL', 'ps_AF')
|
||||
@run_with_locale('LC_ALL', 'ps_AF', '')
|
||||
def test_wide_char_separator_decimal_point(self):
|
||||
# locale with wide char separator and decimal point
|
||||
Decimal = self.decimal.Decimal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue