[Python-checkins] cpython (3.3): Avoid UnicodeEncodeError by only printing ASCII.

zach.ware python-checkins at python.org
Thu Dec 12 17:33:38 CET 2013


http://hg.python.org/cpython/rev/1ad2ff119356
changeset:   87910:1ad2ff119356
branch:      3.3
parent:      87906:222ade565dbd
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Thu Dec 12 10:32:16 2013 -0600
summary:
  Avoid UnicodeEncodeError by only printing ASCII.

This fixes running test_decimal in verbose mode on Windows,
which I broke in issue #19572.

files:
  Lib/test/test_decimal.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1163,10 +1163,10 @@
         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')

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list