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

Method make_hook_recorder

src/_pytest/pytester.py:746–750  ·  view source on GitHub ↗

Create a new :class:`HookRecorder` for a :class:`PytestPluginManager`.

(self, pluginmanager: PytestPluginManager)

Source from the content-addressed store, hash-verified

744 return SysModulesSnapshot(preserve=preserve_module)
745
746 def make_hook_recorder(self, pluginmanager: PytestPluginManager) -> HookRecorder:
747 """Create a new :class:`HookRecorder` for a :class:`PytestPluginManager`."""
748 pluginmanager.reprec = reprec = HookRecorder(pluginmanager, _ispytest=True) # type: ignore[attr-defined]
749 self._request.addfinalizer(reprec.finish_recording)
750 return reprec
751
752 def chdir(self) -> None:
753 """Cd into the temporary directory.

Callers 3

pytest_configureMethod · 0.45
test_make_hook_recorderFunction · 0.45

Calls 2

HookRecorderClass · 0.85
addfinalizerMethod · 0.45

Tested by

no test coverage detected