diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-06 00:19:38 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-06 00:19:38 (GMT) |
commit | 0cc3df8d220dc23ab3a9cbf04bf1cbb0ae104375 (patch) | |
tree | 0e74c06f47cb3a8d9ef9a2f8b2dc9356052c9a5c /Lib/test | |
parent | 1d8ee3afb8adfeb4e4713c42631687b97c421043 (diff) | |
download | cpython-0cc3df8d220dc23ab3a9cbf04bf1cbb0ae104375.zip cpython-0cc3df8d220dc23ab3a9cbf04bf1cbb0ae104375.tar.gz cpython-0cc3df8d220dc23ab3a9cbf04bf1cbb0ae104375.tar.bz2 |
Merged revisions 78704 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78704 | florent.xicluna | 2010-03-06 01:16:57 +0100 (sam, 06 mar 2010) | 2 lines
#2777: Apply same recipe for test_terminate and test_kill, i.e. close or redirect fds.
........
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_subprocess.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 24c3bf9..b5ad6ba 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -671,14 +671,16 @@ class POSIXProcessTestCase(unittest.TestCase): self.assertNotEqual(p.wait(), 0) def test_kill(self): - p = subprocess.Popen([sys.executable, "-c", "input()"]) + p = subprocess.Popen([sys.executable, "-c", "input()"], + stdin=subprocess.PIPE, close_fds=True) self.assertIsNone(p.poll()) p.kill() self.assertEqual(p.wait(), -signal.SIGKILL) def test_terminate(self): - p = subprocess.Popen([sys.executable, "-c", "input()"]) + p = subprocess.Popen([sys.executable, "-c", "input()"], + stdin=subprocess.PIPE, close_fds=True) self.assertIsNone(p.poll()) p.terminate() |