mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +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
|
@ -1253,7 +1253,7 @@ class FormatTest:
|
|||
self.assertRaises(ValueError, format, h, '10Nf')
|
||||
self.assertRaises(ValueError, format, h, 'Nx')
|
||||
|
||||
@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