]> granicus.if.org Git - python/commitdiff
test_zipimport_support: use ascii() on bytes output to avoid BytesWarning
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 20 Oct 2010 21:48:35 +0000 (21:48 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 20 Oct 2010 21:48:35 +0000 (21:48 +0000)
The test failed with python -bb.

Lib/test/test_zipimport_support.py

index aed7f194cea316c7090c90c53d651b57b07ae18f..b996e26f78d5f68c13314772cd177a399253e0fe 100644 (file)
@@ -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):