Applied patch 1669481, slightly modified: Support close_fds on Win32

This commit is contained in:
Peter Astrand 2007-05-26 22:18:20 +00:00
parent 5f9b6c9a1b
commit 81a191b351
3 changed files with 16 additions and 6 deletions

View file

@ -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()