Commit ec4cf5b1 authored by Fredrik Lundh's avatar Fredrik Lundh

Don't spend quite as much time looking for leaks on Windows, where

it's rather expensive to create new processes.
parent 961ee6af
...@@ -338,10 +338,12 @@ class ProcessTestCase(unittest.TestCase): ...@@ -338,10 +338,12 @@ class ProcessTestCase(unittest.TestCase):
# Interpreter without universal newline support # Interpreter without universal newline support
self.assertEqual(stdout, "line1\nline2\rline3\r\nline4\r\nline5\nline6") 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): def test_no_leaking(self):
# Make sure we leak no resources # 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", p = subprocess.Popen([sys.executable, "-c",
"import sys;sys.stdout.write(sys.stdin.read())"], "import sys;sys.stdout.write(sys.stdin.read())"],
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment