From d9a2e70155a85e769d32a1e1fbe7e655203e9575 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 13 Apr 2017 17:34:48 -0300 Subject: [PATCH] Change LsofFdLeakChecker to emit a warning instead of failing when detecting leaked FDs Related to #2366 --- _pytest/pytester.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_pytest/pytester.py b/_pytest/pytester.py index 6dd6772b2..0ee0047e0 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -107,7 +107,8 @@ class LsofFdLeakChecker(object): error.extend([str(f) for f in lines2]) error.append(error[0]) error.append("*** function %s:%s: %s " % item.location) - pytest.fail("\n".join(error), pytrace=False) + error.append("See issue #2366") + item.warn('', "\n".join(error)) # XXX copied from execnet's conftest.py - needs to be merged