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

Method pytest_exception_interact

src/_pytest/debugging.py:286–296  ·  view source on GitHub ↗
(
        self, node: Node, call: "CallInfo[Any]", report: BaseReport
    )

Source from the content-addressed store, hash-verified

284
285class PdbInvoke:
286 def pytest_exception_interact(
287 self, node: Node, call: "CallInfo[Any]", report: BaseReport
288 ) -> None:
289 capman = node.config.pluginmanager.getplugin("capturemanager")
290 if capman:
291 capman.suspend_global_capture(in_=True)
292 out, err = capman.read_global_capture()
293 sys.stdout.write(out)
294 sys.stdout.write(err)
295 assert call.excinfo is not None
296 _enter_pdb(node, call.excinfo, report)
297
298 def pytest_internalerror(self, excinfo: ExceptionInfo[BaseException]) -> None:
299 tb = _postmortem_traceback(excinfo)

Callers 2

call_and_reportFunction · 0.80
collect_one_nodeFunction · 0.80

Calls 5

_enter_pdbFunction · 0.85
getpluginMethod · 0.80
read_global_captureMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected