[Python-checkins] python/dist/src/Lib/test test_subprocess.py, 1.10, 1.11

effbot at users.sourceforge.net effbot at users.sourceforge.net
Wed Oct 13 09:54:57 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32411/Lib/test

Modified Files:
	test_subprocess.py 
Log Message:
Don't spend quite as much time looking for leaks on Windows, where
it's rather expensive to create new processes.



Index: test_subprocess.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_subprocess.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- test_subprocess.py	13 Oct 2004 06:55:40 -0000	1.10
+++ test_subprocess.py	13 Oct 2004 07:54:54 -0000	1.11
@@ -338,10 +338,12 @@
             # Interpreter without universal newline support
             self.assertEqual(stdout, "line1\nline2\rline3\r\nline4\r\nline5\nline6")
 
-    # XXX test_no_leaking takes > a minute to run on a high-end WinXP Pro box
     def test_no_leaking(self):
         # Make sure we leak no resources
-        for i in range(1026):
+        max_handles = 1026 # too much for most UNIX systems
+        if mswindows:
+            max_handles = 65 # a full test is too slow on Windows
+        for i in range(max_handles):
             p = subprocess.Popen([sys.executable, "-c",
                     "import sys;sys.stdout.write(sys.stdin.read())"],
                     stdin=subprocess.PIPE,



More information about the Python-checkins mailing list