From: Victor Stinner Date: Wed, 20 Oct 2010 21:48:35 +0000 (+0000) Subject: test_zipimport_support: use ascii() on bytes output to avoid BytesWarning X-Git-Tag: v3.2a4~407 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6722b5f7f1f3774258edacf128a7c3e3163ceee9;p=thirdparty%2FPython%2Fcpython.git test_zipimport_support: use ascii() on bytes output to avoid BytesWarning The test failed with python -bb. --- diff --git a/Lib/test/test_zipimport_support.py b/Lib/test/test_zipimport_support.py index aed7f194cea3..b996e26f78d5 100644 --- a/Lib/test/test_zipimport_support.py +++ b/Lib/test/test_zipimport_support.py @@ -182,7 +182,7 @@ class ZipSupportTests(ImportHooksBaseTestCase): if verbose: print ("Expected line", expected) print ("Got stdout:") - print (out) + print (ascii(out)) self.assertIn(expected.encode('utf-8'), out) zip_name, run_name = make_zip_script(d, "test_zip", script_name, '__main__.py') @@ -191,7 +191,7 @@ class ZipSupportTests(ImportHooksBaseTestCase): if verbose: print ("Expected line", expected) print ("Got stdout:") - print (out) + print (ascii(out)) self.assertIn(expected.encode('utf-8'), out) def test_pdb_issue4201(self):