summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2009-05-22 05:46:35 (GMT)
committerPhilip Jenvey <pjenvey@underboss.org>2009-05-22 05:46:35 (GMT)
commitab7481a0a4d0402b8d9290df608bb6759e97e9bc (patch)
tree89849f7614abdabd4c9905a1f68089f6603c0563 /Lib/test
parentd40285a986990d45c29e83943dc7783a4e976da5 (diff)
downloadcpython-ab7481a0a4d0402b8d9290df608bb6759e97e9bc.zip
cpython-ab7481a0a4d0402b8d9290df608bb6759e97e9bc.tar.gz
cpython-ab7481a0a4d0402b8d9290df608bb6759e97e9bc.tar.bz2
Merged revisions 72817 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72817 | philip.jenvey | 2009-05-21 22:35:32 -0700 (Thu, 21 May 2009) | 4 lines don't use subprocess.call with PIPEs as the child can fill the pipe buf and deadlock. add a warning to subprocess docs about this, similar to Popen.wait's. refs http://bugs.jython.org/issue1351 ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_cmd_line.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 84588cf..72edc2e 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -2,6 +2,7 @@
# All tests are executed with environment variables ignored
# See test_cmd_line_script.py for testing of script execution
+import os
import test.support, unittest
import os
import sys
@@ -40,8 +41,9 @@ class CmdLineTest(unittest.TestCase):
def exit_code(self, *args):
cmd_line = [sys.executable, '-E']
cmd_line.extend(args)
- return subprocess.call(cmd_line, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ with open(os.devnull, 'w') as devnull:
+ return subprocess.call(cmd_line, stdout=devnull,
+ stderr=subprocess.STDOUT)
def test_directories(self):
self.assertNotEqual(self.exit_code('.'), 0)