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

Method pytest_exception_interact

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

Source from the content-addressed store, hash-verified

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

Callers 4

__exit__Method · 0.80
call_and_reportFunction · 0.80
collect_one_nodeFunction · 0.80
addSubTestMethod · 0.80

Calls 5

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

Tested by 2

__exit__Method · 0.64
addSubTestMethod · 0.64