]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Removed test_close_fds, because it's too unreliable. We simply cannot
authorPeter Astrand <astrand@lysator.liu.se>
Thu, 21 Oct 2004 19:28:34 +0000 (19:28 +0000)
committerPeter Astrand <astrand@lysator.liu.se>
Thu, 21 Oct 2004 19:28:34 +0000 (19:28 +0000)
know that the newly-started Python process only has 3 filedescriptors
open. Fixes bug 1048808.

Lib/test/test_subprocess.py

index 639a54d9b510c683bb3e415ada5eb30e374db068..a5d9d9c59f332c5a8152aed5238a1d82093ab8d4 100644 (file)
@@ -421,16 +421,6 @@ class ProcessTestCase(unittest.TestCase):
                              preexec_fn=lambda: os.putenv("FRUIT", "apple"))
             self.assertEqual(p.stdout.read(), "apple")
 
-        def test_close_fds(self):
-            # Make sure we have some fds open
-            os.pipe()
-            p = subprocess.Popen([sys.executable, "-c",
-                              'import sys,os;' \
-                              'sys.stdout.write(str(os.dup(0)))'],
-                             stdout=subprocess.PIPE, close_fds=1)
-            # When all fds are closed, the next free fd should be 3.
-            self.assertEqual(p.stdout.read(), "3")
-
         def test_args_string(self):
             # args is a string
             f, fname = self.mkstemp()