From 4c50f1166b3c931e22ec1a7d23a8510d72f418f7 Mon Sep 17 00:00:00 2001 From: Scott Stanton Date: Fri, 20 Mar 2020 13:17:59 -0700 Subject: [PATCH] fix: #117 use rel_path instead of name for the mtimes lookup to avoid collisions (#118) --- pytest_pylint/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_pylint/plugin.py b/pytest_pylint/plugin.py index 5b7588e..4d26211 100644 --- a/pytest_pylint/plugin.py +++ b/pytest_pylint/plugin.py @@ -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): @@ -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."""