From c0d87c0aa18478292f0fd5b97382d68d73399965 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 7 Aug 2019 20:54:03 +0100 Subject: [PATCH] testlib: use lsof +E for much clearer leaked FD output --- tests/testlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testlib.py b/tests/testlib.py index f856bfc1..3d641892 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 -w -p %s' % (os.getpid(),)) + import os; os.system('lsof +E -w -p %s' % (os.getpid(),)) assert 0, "%s leaked FDs. Count before: %s, after: %s" % ( self, self._fd_count_before, get_fd_count(), )