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

Method __init__

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

Source from the content-addressed store, hash-verified

257 """
258
259 def __init__(
260 self, pluginmanager: PytestPluginManager, *, _ispytest: bool = False
261 ) -> None:
262 check_ispytest(_ispytest)
263
264 self._pluginmanager = pluginmanager
265 self.calls: list[RecordedHookCall] = []
266 self.ret: int | ExitCode | None = None
267
268 def before(hook_name: str, hook_impls, kwargs) -> None:
269 self.calls.append(RecordedHookCall(hook_name, kwargs))
270
271 def after(outcome, hook_name: str, hook_impls, kwargs) -> None:
272 pass
273
274 self._undo_wrapping = pluginmanager.add_hookcall_monitoring(before, after)
275
276 def finish_recording(self) -> None:
277 self._undo_wrapping()

Callers

nothing calls this directly

Calls 1

check_ispytestFunction · 0.90

Tested by

no test coverage detected