diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-12-05 02:27:01 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-12-05 02:27:01 +0000 |
commit | 26576801a683fba28e66fca4759fdc327e87ea3e (patch) | |
tree | 22e40cbdb3610f03c9c809ebc969c175ed0fd70b /Lib/test/test_subprocess.py | |
parent | 1743201364feaa9ab56acda3ccef051b2dd1d814 (diff) | |
download | cpython-git-26576801a683fba28e66fca4759fdc327e87ea3e.tar.gz |
rename the new check_call_output to check_output. its less ugly.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 878b79bd95..ae8e88877f 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -72,33 +72,33 @@ class ProcessTestCase(unittest.TestCase): else: self.fail("Expected CalledProcessError") - def test_check_call_output(self): - # check_call_output() function with zero return code - output = subprocess.check_call_output( + def test_check_output(self): + # check_output() function with zero return code + output = subprocess.check_output( [sys.executable, "-c", "print 'BDFL'"]) self.assertTrue('BDFL' in output) - def test_check_call_output_nonzero(self): + def test_check_output_nonzero(self): # check_call() function with non-zero return code try: - subprocess.check_call_output( + subprocess.check_output( [sys.executable, "-c", "import sys; sys.exit(5)"]) except subprocess.CalledProcessError, e: self.assertEqual(e.returncode, 5) else: self.fail("Expected CalledProcessError") - def test_check_call_output_stderr(self): - # check_call_output() function stderr redirected to stdout - output = subprocess.check_call_output( + def test_check_output_stderr(self): + # check_output() function stderr redirected to stdout + output = subprocess.check_output( [sys.executable, "-c", "import sys; sys.stderr.write('BDFL')"], stderr=subprocess.STDOUT) self.assertTrue('BDFL' in output) - def test_check_call_output_stdout_arg(self): - # check_call_output() function stderr redirected to stdout + def test_check_output_stdout_arg(self): + # check_output() function stderr redirected to stdout try: - output = subprocess.check_call_output( + output = subprocess.check_output( [sys.executable, "-c", "print 'will not be run'"], stdout=sys.stdout) except ValueError, e: |