MCPcopy Create free account
hub / github.com/pytest-dev/pytest / pytest_sessionfinish

Method pytest_sessionfinish

src/_pytest/cacheprovider.py:424–433  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
436def pytest_addoption(parser: Parser) -> None:

Callers

nothing calls this directly

Calls 2

setMethod · 0.80
getoptionMethod · 0.45

Tested by

no test coverage detected