(self)
| 422 | return sorted(items, key=lambda item: item.path.stat().st_mtime, reverse=True) # type: ignore[no-any-return] |
| 423 | |
| 424 | def pytest_sessionfinish(self) -> None: |
| 425 | config = self.config |
| 426 | if config.getoption("cacheshow") or hasattr(config, "workerinput"): |
| 427 | return |
| 428 | |
| 429 | if config.getoption("collectonly"): |
| 430 | return |
| 431 | |
| 432 | assert config.cache is not None |
| 433 | config.cache.set("cache/nodeids", sorted(self.cached_nodeids)) |
| 434 | |
| 435 | |
| 436 | def pytest_addoption(parser: Parser) -> None: |