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

Method set_session

src/_pytest/assertion/rewrite.py:95–97  ·  view source on GitHub ↗
(self, session: Session | None)

Source from the content-addressed store, hash-verified

93 self._session_paths_checked = False
94
95 def set_session(self, session: Session | None) -> None:
96 self.session = session
97 self._session_paths_checked = False
98
99 # Indirection so we can mock calls to find_spec originated from the hook during testing
100 _find_spec = importlib.machinery.PathFinder.find_spec

Callers 3

hookMethod · 0.95
pytest_collectionFunction · 0.80
pytest_sessionfinishFunction · 0.80

Calls

no outgoing calls

Tested by 1

hookMethod · 0.76