Skip to content

Commit 6e97cf6

Browse files
committed
fixup! fixup! pdb: resume capturing after continue
1 parent 6e61615 commit 6e97cf6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

_pytest/debugging.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,22 @@ def do_continue(self, arg):
6868
tw = _pytest.config.create_terminal_writer(cls._config)
6969
tw.line()
7070
tw.sep(">", "PDB continue (IO-capturing resumed)")
71-
self._pytest_capman.resumecapture()
71+
self._pytest_capman.resume_global_capture()
7272
return ret
7373
do_c = do_cont = do_continue
7474

7575
def setup(self, f, tb):
7676
"""Suspend on setup().
7777
78-
Needed after continue resumed, and entering a breakpoint.
78+
Needed after do_continue resumed, and entering another
79+
breakpoint again.
7980
Should get skipped on the first call probably."""
8081
ret = super(PytestPdb, self).setup(f, tb)
8182
if not ret:
83+
# pdb.setup() returns True if the command wants to exit
84+
# from the interaction: do not suspend capturing then.
8285
if self._pytest_capman:
83-
self._pytest_capman.suspendcapture(in_=True)
86+
self._pytest_capman.suspend_global_capture(in_=True)
8487
return ret
8588

8689
_pdb = PytestPdb()

0 commit comments

Comments
 (0)