diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 23:04:36 +0000 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-23 23:04:36 +0000 |
commit | aa98058cc44ba20f35c106d20918c6196b737561 (patch) | |
tree | 317b6f7bf17df98e284d0902ae10a64faf4ccd91 /Lib/test/test_subprocess.py | |
parent | 8cd0a66a0fd7bb7d69153906942930c2e8c3dd17 (diff) | |
download | cpython-git-aa98058cc44ba20f35c106d20918c6196b737561.tar.gz |
use assert[Not]In where appropriate
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 1693c6b445..db93393777 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -76,7 +76,7 @@ class ProcessTestCase(unittest.TestCase): # check_output() function with zero return code output = subprocess.check_output( [sys.executable, "-c", "print 'BDFL'"]) - self.assertTrue('BDFL' in output) + self.assertIn('BDFL', output) def test_check_output_nonzero(self): # check_call() function with non-zero return code @@ -93,7 +93,7 @@ class ProcessTestCase(unittest.TestCase): output = subprocess.check_output( [sys.executable, "-c", "import sys; sys.stderr.write('BDFL')"], stderr=subprocess.STDOUT) - self.assertTrue('BDFL' in output) + self.assertIn('BDFL', output) def test_check_output_stdout_arg(self): # check_output() function stderr redirected to stdout @@ -102,7 +102,7 @@ class ProcessTestCase(unittest.TestCase): [sys.executable, "-c", "print 'will not be run'"], stdout=sys.stdout) except ValueError, e: - self.assertTrue('stdout' in e.args[0]) + self.assertIn('stdout', e.args[0]) else: self.fail("Expected ValueError when stdout arg supplied.") |