MCPcopy
hub / github.com/pytest-dev/pytest / get_last_failed_paths

Method get_last_failed_paths

src/_pytest/cacheprovider.py:332–341  ·  view source on GitHub ↗

Return a set with all Paths of the previously failed nodeids and their parents.

(self)

Source from the content-addressed store, hash-verified

330 )
331
332 def get_last_failed_paths(self) -> set[Path]:
333 """Return a set with all Paths of the previously failed nodeids and
334 their parents."""
335 rootpath = self.config.rootpath
336 result = set()
337 for nodeid in self.lastfailed:
338 path = rootpath / nodeid.split("::")[0]
339 result.add(path)
340 result.update(path.parents)
341 return {x for x in result if x.exists()}
342
343 def pytest_report_collectionfinish(self) -> str | None:
344 if self.active and self.config.get_verbosity() >= 0:

Callers 1

__init__Method · 0.95

Calls 2

updateMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected