summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2007-05-26 22:18:20 (GMT)
committerPeter Astrand <astrand@lysator.liu.se>2007-05-26 22:18:20 (GMT)
commit81a191b3510bbed302cb0a766bc6966cb4effaca (patch)
treee5c4438e52d5fe183db39d45ebddc34c56742f8b /Lib/test/test_subprocess.py
parent5f9b6c9a1bc1c6aa1b07db52c8b851bb7e798f7a (diff)
downloadcpython-81a191b3510bbed302cb0a766bc6966cb4effaca.zip
cpython-81a191b3510bbed302cb0a766bc6966cb4effaca.tar.gz
cpython-81a191b3510bbed302cb0a766bc6966cb4effaca.tar.bz2
Applied patch 1669481, slightly modified: Support close_fds on Win32
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index c2db6fa..e79159c 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -617,8 +617,16 @@ class ProcessTestCase(unittest.TestCase):
self.assertRaises(ValueError, subprocess.call,
[sys.executable,
"-c", "import sys; sys.exit(47)"],
+ stdout=subprocess.PIPE,
close_fds=True)
+ def test_close_fds(self):
+ # close file descriptors
+ rc = subprocess.call([sys.executable, "-c",
+ "import sys; sys.exit(47)"],
+ close_fds=True)
+ self.assertEqual(rc, 47)
+
def test_shell_sequence(self):
# Run command through the shell (sequence)
newenv = os.environ.copy()