Commit 6c64cc19 authored by Antoine Pitrou's avatar Antoine Pitrou

Reap processes at test end to avoid false positives in reference leak detection.

parent de157cc5
...@@ -2508,6 +2508,7 @@ class TestWait(unittest.TestCase): ...@@ -2508,6 +2508,7 @@ class TestWait(unittest.TestCase):
w.close() w.close()
readers.append(r) readers.append(r)
procs.append(p) procs.append(p)
self.addCleanup(p.join)
while readers: while readers:
for r in wait(readers): for r in wait(readers):
...@@ -2549,6 +2550,7 @@ class TestWait(unittest.TestCase): ...@@ -2549,6 +2550,7 @@ class TestWait(unittest.TestCase):
p.daemon = True p.daemon = True
p.start() p.start()
procs.append(p) procs.append(p)
self.addCleanup(p.join)
for i in range(4): for i in range(4):
r, _ = l.accept() r, _ = l.accept()
......
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