diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-09-28 15:17:11 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-09-28 15:17:11 (GMT) |
commit | 8a491a8eef6c2e1997eae1b17ba94cd8c2d1763e (patch) | |
tree | a73565bcb84a90942161636856b7e5bba744754a /Lib/test/test_decimal.py | |
parent | 8ec31c200621b52febdb9e02f7c36eddda37eb78 (diff) | |
download | cpython-8a491a8eef6c2e1997eae1b17ba94cd8c2d1763e.zip cpython-8a491a8eef6c2e1997eae1b17ba94cd8c2d1763e.tar.gz cpython-8a491a8eef6c2e1997eae1b17ba94cd8c2d1763e.tar.bz2 |
Closes #16080: The decorator ignores failed attempts to set the required
locale, so an additional check is required.
Diffstat (limited to 'Lib/test/test_decimal.py')
-rw-r--r-- | Lib/test/test_decimal.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index b2ec1a6..ec5db9f 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -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') |