Return a set with all Paths of the previously failed nodeids and their parents.
(self)
| 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: |