Skip to content

Commit

Permalink
fix: #117 use rel_path instead of name for the mtimes lookup to avoid…
Browse files Browse the repository at this point in the history
… collisions (#118)
  • Loading branch information
snstanton committed Mar 20, 2020
1 parent b80595c commit 4c50f11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytest_pylint/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def __init__(self, fspath, parent, pylint_plugin):

self._nodeid += '::PYLINT'
self.mtime = self.fspath.mtime()
prev_mtime = self.plugin.mtimes.get(self.name, 0)
prev_mtime = self.plugin.mtimes.get(self.rel_path, 0)
self.should_skip = (prev_mtime == self.mtime)

def setup(self):
Expand Down Expand Up @@ -319,7 +319,7 @@ def _loop_errors(writer):
raise PyLintException('\n'.join(reported_errors))

# Update the cache if the item passed pylint.
self.plugin.mtimes[self.name] = self.mtime
self.plugin.mtimes[self.rel_path] = self.mtime

def repr_failure(self, excinfo, style=None):
"""Handle any test failures by checking that they were ours."""
Expand Down

0 comments on commit 4c50f11

Please sign in to comment.