diff --git a/tests/testlib.py b/tests/testlib.py index 73d3438d..b702fa05 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -338,7 +338,7 @@ class TestCase(unittest2.TestCase): def _teardown_check_fds(self): mitogen.core.Latch._on_fork() if get_fd_count() != self._fd_count_before: - import os; os.system('lsof +E -w -p %s' % (os.getpid(),)) + import os; os.system('lsof +E -w -p %s | grep -vw mem' % (os.getpid(),)) assert 0, "%s leaked FDs. Count before: %s, after: %s" % ( self, self._fd_count_before, get_fd_count(), )