Commit c456bc93 authored by Ezio Melotti's avatar Ezio Melotti

#17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.

parent bd20d05e
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment