diff --git a/tests/test_functional.py b/tests/test_functional.py index 4d1bcc36..f74a2527 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -98,9 +98,10 @@ def stop_subprocess(self): self.proc.terminate() self.sock.close() # This give us one FD back ... - self.queue.close() self.proc.join() self.proc.close() + self.queue.close() + self.queue.join_thread() # The following is for the benefit of PyPy 3, for some reason it is # holding on to some resources way longer than necessary causing tests @@ -109,6 +110,7 @@ def stop_subprocess(self): # increase the limits before running tests, this works as well and # means we don't need to remember to do that. import gc + gc.collect() def assertline(self, line, status, reason, version):