summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-06 11:52:51 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-06 11:52:51 (GMT)
commitfadf93a162858d0945363d820533594de5b48aec (patch)
tree035498a8461037c7942d94e3be3b14e550b43436 /Lib/test
parentda7bfd5b1df98d93b20c8c354f0daf624ad8058a (diff)
downloadcpython-fadf93a162858d0945363d820533594de5b48aec.zip
cpython-fadf93a162858d0945363d820533594de5b48aec.tar.gz
cpython-fadf93a162858d0945363d820533594de5b48aec.tar.bz2
Merged revisions 78721 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78721 | florent.xicluna | 2010-03-06 10:54:14 +0100 (sam, 06 mar 2010) | 2 lines #2777: Apply same recipe on win32, i.e. do not inherit file handles. ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_subprocess.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index b5ad6ba..a5e831d 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -767,21 +767,23 @@ class Win32ProcessTestCase(unittest.TestCase):
self.assertEqual(rc, 47)
def test_send_signal(self):
- p = subprocess.Popen([sys.executable, "-c", "input()"])
+ # Do not inherit file handles from the parent.
+ # It should fix failure on some platforms.
+ p = subprocess.Popen([sys.executable, "-c", "input()"], close_fds=True)
self.assertIs(p.poll(), None)
p.send_signal(signal.SIGTERM)
self.assertNotEqual(p.wait(), 0)
def test_kill(self):
- p = subprocess.Popen([sys.executable, "-c", "input()"])
+ p = subprocess.Popen([sys.executable, "-c", "input()"], close_fds=True)
self.assertIs(p.poll(), None)
p.kill()
self.assertNotEqual(p.wait(), 0)
def test_terminate(self):
- p = subprocess.Popen([sys.executable, "-c", "input()"])
+ p = subprocess.Popen([sys.executable, "-c", "input()"], close_fds=True)
self.assertIs(p.poll(), None)
p.terminate()