summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.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_subprocess.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_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 265859a..dbde4fd 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -77,7 +77,7 @@ class ProcessTestCase(unittest.TestCase):
# check_output() function with zero return code
output = subprocess.check_output(
[sys.executable, "-c", "print('BDFL')"])
- self.assertTrue(b'BDFL' in output)
+ self.assertIn(b'BDFL', output)
def test_check_output_nonzero(self):
# check_call() function with non-zero return code
@@ -94,7 +94,7 @@ class ProcessTestCase(unittest.TestCase):
output = subprocess.check_output(
[sys.executable, "-c", "import sys; sys.stderr.write('BDFL')"],
stderr=subprocess.STDOUT)
- self.assertTrue(b'BDFL' in output)
+ self.assertIn(b'BDFL', output)
def test_check_output_stdout_arg(self):
# check_output() function stderr redirected to stdout
@@ -103,7 +103,7 @@ class ProcessTestCase(unittest.TestCase):
[sys.executable, "-c", "print('will not be run')"],
stdout=sys.stdout)
except ValueError as e:
- self.assertTrue('stdout' in e.args[0])
+ self.assertIn('stdout', e.args[0])
else:
self.fail("Expected ValueError when stdout arg supplied.")