| 285 | |
| 286 | class 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) |