mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
Applied patch 1669481, slightly modified: Support close_fds on Win32
This commit is contained in:
parent
5f9b6c9a1b
commit
81a191b351
3 changed files with 16 additions and 6 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue