diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-23 05:53:56 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-23 05:53:56 (GMT) |
commit | 507eb09ad6b051821c50bdf723edd0c3119012e8 (patch) | |
tree | 1560f22841d1e53d6e3f61ef467611e2507e3742 | |
parent | 1ca8794f10b4cb1eda064baea203bec3d6de6cbf (diff) | |
download | cpython-507eb09ad6b051821c50bdf723edd0c3119012e8.zip cpython-507eb09ad6b051821c50bdf723edd0c3119012e8.tar.gz cpython-507eb09ad6b051821c50bdf723edd0c3119012e8.tar.bz2 |
#17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.
-rw-r--r-- | Lib/test/test_format.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 7fa950d..44f1bb7 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: |