diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_subprocess.py | 11 |
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 # |