mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Closes #16080: The decorator ignores failed attempts to set the required
locale, so an additional check is required.
This commit is contained in:
parent
8ec31c2006
commit
8a491a8eef
1 changed files with 6 additions and 0 deletions
|
@ -1140,8 +1140,14 @@ class FormatTest(unittest.TestCase):
|
|||
@run_with_locale('LC_ALL', 'ps_AF')
|
||||
def test_wide_char_separator_decimal_point(self):
|
||||
# locale with wide char separator and decimal point
|
||||
import locale
|
||||
Decimal = self.decimal.Decimal
|
||||
|
||||
decimal_point = locale.localeconv()['decimal_point']
|
||||
thousands_sep = locale.localeconv()['thousands_sep']
|
||||
if decimal_point != '\u066b' or thousands_sep != '\u066c':
|
||||
return
|
||||
|
||||
self.assertEqual(format(Decimal('100000000.123'), 'n'),
|
||||
'100\u066c000\u066c000\u066b123')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue