From: Zachary Ware Date: Thu, 12 Dec 2013 16:32:16 +0000 (-0600) Subject: Avoid UnicodeEncodeError by only printing ASCII. X-Git-Tag: v3.4.0b2~250^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f533acf884f01987bfde9f0cf6dc17c4b9a2f61;p=thirdparty%2FPython%2Fcpython.git Avoid UnicodeEncodeError by only printing ASCII. This fixes running test_decimal in verbose mode on Windows, which I broke in issue #19572. --- diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index d67df7918c9d..40313475fb99 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -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')