]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Avoid UnicodeEncodeError by only printing ASCII.
authorZachary Ware <zachary.ware@gmail.com>
Thu, 12 Dec 2013 16:32:16 +0000 (10:32 -0600)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 12 Dec 2013 16:32:16 +0000 (10:32 -0600)
This fixes running test_decimal in verbose mode on Windows,
which I broke in issue #19572.

Lib/test/test_decimal.py

index d67df7918c9d42c6c26a6556aa7b49e94f54e47f..40313475fb999697f17452a91b2add69bef3f0e1 100644 (file)
@@ -1163,10 +1163,10 @@ class FormatTest(unittest.TestCase):
         thousands_sep = locale.localeconv()['thousands_sep']
         if decimal_point != '\u066b':
             self.skipTest('inappropriate decimal point separator'
-                          '({!r} not {!r})'.format(decimal_point, '\u066b'))
+                          '({!a} not {!a})'.format(decimal_point, '\u066b'))
         if thousands_sep != '\u066c':
             self.skipTest('inappropriate thousands separator'
-                          '({!r} not {!r})'.format(thousands_sep, '\u066c'))
+                          '({!a} not {!a})'.format(thousands_sep, '\u066c'))
 
         self.assertEqual(format(Decimal('100000000.123'), 'n'),
                          '100\u066c000\u066c000\u066b123')