]> granicus.if.org Git - python/commitdiff
#17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 23 Feb 2013 05:53:56 +0000 (07:53 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 23 Feb 2013 05:53:56 +0000 (07:53 +0200)
Lib/test/test_format.py

index 7fa950d9ef5e44c6b86b149e177c31292aa9d3b5..44f1bb72ec0f2fa780b36da32717b2fca378ea19 100644 (file)
@@ -13,10 +13,10 @@ maxsize = support.MAX_Py_ssize_t
 def testformat(formatstr, args, output=None, limit=None, overflowok=False):
     if verbose:
         if output:
-            print("%r %% %r =? %r ..." %\
-                (formatstr, args, output), end=' ')
+            print("{!a} % {!a} =? {!a} ...".format(formatstr, args, output),
+                  end=' ')
         else:
-            print("%r %% %r works? ..." % (formatstr, args), end=' ')
+            print("{!a} % {!a} works? ...".format(formatstr, args), end=' ')
     try:
         result = formatstr % args
     except OverflowError: