From: Ezio Melotti Date: Sat, 23 Feb 2013 05:53:56 +0000 (+0200) Subject: #17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only. X-Git-Tag: v3.2.4rc1~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=507eb09ad6b051821c50bdf723edd0c3119012e8;p=python #17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only. --- diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 7fa950d9ef..44f1bb72ec 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: