Skip to content

Commit

Permalink
pytester: no ignore files used to obtain current user metadata in the…
Browse files Browse the repository at this point in the history
… fd leak detector
  • Loading branch information
RonnyPfannschmidt committed Sep 16, 2017
1 parent ac5c5cc commit 6935e9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions _pytest/pytester.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
from _pytest.assertion.rewrite import AssertionRewritingHook


IGNORE_PAM = [ # filenames added when obtaining details about the current user
u'/var/lib/sss/mc/passwd'
]


def pytest_addoption(parser):
# group = parser.getgroup("pytester", "pytester (self-tests) options")
parser.addoption('--lsof',
Expand Down Expand Up @@ -71,6 +76,8 @@ def isopen(line):
fields = line.split('\0')
fd = fields[0][1:]
filename = fields[1][1:]
if filename in IGNORE_PAM:
continue
if filename.startswith('/'):
open_files.append((fd, filename))

Expand Down
1 change: 1 addition & 0 deletions changelog/2784.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytester: no ignore files used to obtain current user metadata in the fd leak detector

0 comments on commit 6935e9d

Please sign in to comment.