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

The test failed with python -bb.
This commit is contained in:
Victor Stinner 2010-10-20 21:48:35 +00:00
parent b8ffb60ec6
commit 6722b5f7f1

View 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):