From 507eb09ad6b051821c50bdf723edd0c3119012e8 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 23 Feb 2013 07:53:56 +0200 Subject: [PATCH] #17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only. --- Lib/test/test_format.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 7fa950d9ef5..44f1bb72ec0 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -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: