[Python-checkins] r78705 - in python/branches/py3k: Lib/test/test_subprocess.py

florent.xicluna python-checkins at python.org
Sat Mar 6 01:19:38 CET 2010


Author: florent.xicluna
Date: Sat Mar  6 01:19:38 2010
New Revision: 78705

Log:
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.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/test/test_subprocess.py

Modified: python/branches/py3k/Lib/test/test_subprocess.py
==============================================================================
--- python/branches/py3k/Lib/test/test_subprocess.py	(original)
+++ python/branches/py3k/Lib/test/test_subprocess.py	Sat Mar  6 01:19:38 2010
@@ -671,14 +671,16 @@
         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()


More information about the Python-checkins mailing list