We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceb4f3f commit 480dd9eCopy full SHA for 480dd9e
src/_pytest/cacheprovider.py
@@ -164,13 +164,14 @@ def __init__(self, config):
164
def last_failed_paths(self):
165
"""Returns a set with all Paths()s of the previously failed nodeids (cached).
166
"""
167
- result = getattr(self, "_last_failed_paths", None)
168
- if result is None:
+ try:
+ return self._last_failed_paths
169
+ except AttributeError:
170
rootpath = Path(self.config.rootdir)
171
result = {rootpath / nodeid.split("::")[0] for nodeid in self.lastfailed}
172
result = {x for x in result if x.exists()}
173
self._last_failed_paths = result
- return result
174
+ return result
175
176
def pytest_ignore_collect(self, path):
177
0 commit comments