Skip to content

Commit

Permalink
python#17217: fix UnicodeEncodeErrors errors in test_format by printi…
Browse files Browse the repository at this point in the history
…ng ASCII only.
  • Loading branch information
ezio-melotti committed Feb 23, 2013
1 parent 1ca8794 commit 507eb09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
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:
Expand Down

0 comments on commit 507eb09

Please sign in to comment.