[Python-checkins] r85761 - python/branches/py3k/Lib/test/test_zipimport_support.py

victor.stinner python-checkins at python.org
Wed Oct 20 23:48:36 CEST 2010


Author: victor.stinner
Date: Wed Oct 20 23:48:35 2010
New Revision: 85761

Log:
test_zipimport_support: use ascii() on bytes output to avoid BytesWarning

The test failed with python -bb.


Modified:
   python/branches/py3k/Lib/test/test_zipimport_support.py

Modified: python/branches/py3k/Lib/test/test_zipimport_support.py
==============================================================================
--- python/branches/py3k/Lib/test/test_zipimport_support.py	(original)
+++ python/branches/py3k/Lib/test/test_zipimport_support.py	Wed Oct 20 23:48:35 2010
@@ -182,7 +182,7 @@
             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 @@
             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):


More information about the Python-checkins mailing list