summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipimport_support.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-19 00:09:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-19 00:09:57 (GMT)
commit577473fe687b38c8f01b0c372d6d2563680045b3 (patch)
treeee7dc210c7c5281cf07add09a9cb451758e91716 /Lib/test/test_zipimport_support.py
parenta69ba65fdce3be6f55634b47cc56cf1f962f6cbc (diff)
downloadcpython-577473fe687b38c8f01b0c372d6d2563680045b3.zip
cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.gz
cpython-577473fe687b38c8f01b0c372d6d2563680045b3.tar.bz2
use assert[Not]In where appropriate
A patch from Dave Malcolm.
Diffstat (limited to 'Lib/test/test_zipimport_support.py')
-rw-r--r--Lib/test/test_zipimport_support.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_zipimport_support.py b/Lib/test/test_zipimport_support.py
index 3a99eb7..a868ced 100644
--- a/Lib/test/test_zipimport_support.py
+++ b/Lib/test/test_zipimport_support.py
@@ -185,7 +185,7 @@ class ZipSupportTests(ImportHooksBaseTestCase):
print ("Expected line", expected)
print ("Got stdout:")
print (data)
- self.assertTrue(expected.encode('utf-8') in data)
+ self.assertIn(expected.encode('utf-8'), data)
zip_name, run_name = make_zip_script(d, "test_zip",
script_name, '__main__.py')
exit_code, data = run_python(zip_name)
@@ -194,7 +194,7 @@ class ZipSupportTests(ImportHooksBaseTestCase):
print ("Expected line", expected)
print ("Got stdout:")
print (data)
- self.assertTrue(expected.encode('utf-8') in data)
+ self.assertIn(expected.encode('utf-8'), data)
def test_pdb_issue4201(self):
test_src = textwrap.dedent("""\
@@ -209,13 +209,13 @@ class ZipSupportTests(ImportHooksBaseTestCase):
p = spawn_python(script_name)
p.stdin.write(b'l\n')
data = kill_python(p)
- self.assertTrue(script_name.encode('utf-8') in data)
+ self.assertIn(script_name.encode('utf-8'), data)
zip_name, run_name = make_zip_script(d, "test_zip",
script_name, '__main__.py')
p = spawn_python(zip_name)
p.stdin.write(b'l\n')
data = kill_python(p)
- self.assertTrue(run_name.encode('utf-8') in data)
+ self.assertIn(run_name.encode('utf-8'), data)
def test_main():