summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_functional.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py
index 3103391..4d1bcc3 100644
--- a/tests/test_functional.py
+++ b/tests/test_functional.py
@@ -102,6 +102,15 @@ class SubprocessTests:
self.proc.join()
self.proc.close()
+ # 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
+ # to fail with file desctriptor exceeded errors on macOS which defaults
+ # to 256 file desctriptors per process. While we could use ulimit to
+ # 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):
v, s, r = (x.strip() for x in line.split(None, 2))
self.assertEqual(s, status.encode("latin-1"))