#17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.
This commit is contained in:
parent
1ca8794f10
commit
507eb09ad6
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue