summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-05-21 20:39:17 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-05-21 20:39:17 (GMT)
commit86c73bf0fcbd4f123f63a4be08d1d1b57c8238b2 (patch)
tree9f1c443a778cf1c918f674537de90970e03a2484
parent8c5a7bbf0e6c556df90442d776423e6e29cf0d70 (diff)
downloadcpython-86c73bf0fcbd4f123f63a4be08d1d1b57c8238b2.zip
cpython-86c73bf0fcbd4f123f63a4be08d1d1b57c8238b2.tar.gz
cpython-86c73bf0fcbd4f123f63a4be08d1d1b57c8238b2.tar.bz2
Issue #8780: Only backport the new test, the fix is not needed
Recorded merge of revisions 81403 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81403 | victor.stinner | 2010-05-21 22:13:12 +0200 (ven., 21 mai 2010) | 5 lines Issue #8780: Fix a regression introduced by r78946 in subprocess on Windows Ensure that stdout / stderr is inherited from the parent if stdout=PIPE / stderr=PIPE is not used. ........
-rw-r--r--Lib/test/test_subprocess.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index a4a4407..f69172a 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -539,6 +539,17 @@ class ProcessTestCase(unittest.TestCase):
if err.errno != 2: # ignore "no such file"
raise
+ def test_issue8780(self):
+ # Ensure that stdout is inherited from the parent
+ # if stdout=PIPE is not used
+ code = ';'.join((
+ 'import subprocess, sys',
+ 'retcode = subprocess.call('
+ "[sys.executable, '-c', 'print(\"Hello World!\")'])",
+ 'assert retcode == 0'))
+ output = subprocess.check_output([sys.executable, '-c', code])
+ self.assert_(output.startswith(b'Hello World!'), ascii(output))
+
#
# POSIX tests
#