summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2004-10-13 07:54:54 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2004-10-13 07:54:54 (GMT)
commit9e29fc584c28111a8727d9c02082c53aae8c4121 (patch)
treeb292e885fabf1ed582c10da546b6cda3b3640ecc /Lib/test/test_subprocess.py
parent59c05595546ff317f6ffa317b3232b5f6f54c9e2 (diff)
downloadcpython-9e29fc584c28111a8727d9c02082c53aae8c4121.zip
cpython-9e29fc584c28111a8727d9c02082c53aae8c4121.tar.gz
cpython-9e29fc584c28111a8727d9c02082c53aae8c4121.tar.bz2
Don't spend quite as much time looking for leaks on Windows, where
it's rather expensive to create new processes.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index ded5891..5875bc2 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -338,10 +338,12 @@ class ProcessTestCase(unittest.TestCase):
# 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,