diff --git a/_pytest/debugging.py b/_pytest/debugging.py index e1f5c327a03..cb9f0ea865e 100644 --- a/_pytest/debugging.py +++ b/_pytest/debugging.py @@ -68,19 +68,22 @@ def do_continue(self, arg): tw = _pytest.config.create_terminal_writer(cls._config) tw.line() tw.sep(">", "PDB continue (IO-capturing resumed)") - self._pytest_capman.resumecapture() + self._pytest_capman.resume_global_capture() return ret do_c = do_cont = do_continue def setup(self, f, tb): """Suspend on setup(). - Needed after continue resumed, and entering a breakpoint. + Needed after do_continue resumed, and entering another + breakpoint again. Should get skipped on the first call probably.""" ret = super(PytestPdb, self).setup(f, tb) if not ret: + # pdb.setup() returns True if the command wants to exit + # from the interaction: do not suspend capturing then. if self._pytest_capman: - self._pytest_capman.suspendcapture(in_=True) + self._pytest_capman.suspend_global_capture(in_=True) return ret _pdb = PytestPdb()