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

Method __init__

src/_pytest/pytester.py:254–269  ·  view source on GitHub ↗
(
        self, pluginmanager: PytestPluginManager, *, _ispytest: bool = False
    )

Source from the content-addressed store, hash-verified

252 """
253
254 def __init__(
255 self, pluginmanager: PytestPluginManager, *, _ispytest: bool = False
256 ) -> None:
257 check_ispytest(_ispytest)
258
259 self._pluginmanager = pluginmanager
260 self.calls: List[RecordedHookCall] = []
261 self.ret: Optional[Union[int, ExitCode]] = None
262
263 def before(hook_name: str, hook_impls, kwargs) -> None:
264 self.calls.append(RecordedHookCall(hook_name, kwargs))
265
266 def after(outcome, hook_name: str, hook_impls, kwargs) -> None:
267 pass
268
269 self._undo_wrapping = pluginmanager.add_hookcall_monitoring(before, after)
270
271 def finish_recording(self) -> None:
272 self._undo_wrapping()

Callers

nothing calls this directly

Calls 1

check_ispytestFunction · 0.90

Tested by

no test coverage detected