File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -146,22 +146,25 @@ def do_debug(self, arg):
146
146
147
147
def do_continue (self , arg ):
148
148
ret = super (_PdbWrapper , self ).do_continue (arg )
149
- if self . _pytest_capman :
149
+ if cls . _recursive_debug == 0 :
150
150
tw = _pytest .config .create_terminal_writer (cls ._config )
151
151
tw .line ()
152
- if cls . _recursive_debug == 0 :
152
+ if self . _pytest_capman :
153
153
capturing = self ._pytest_capman .is_capturing ()
154
+ else :
155
+ capturing = False
156
+ if capturing :
154
157
if capturing == "global" :
155
158
tw .sep (">" , "PDB continue (IO-capturing resumed)" )
156
- elif capturing :
159
+ else :
157
160
tw .sep (
158
161
">" ,
159
162
"PDB continue (IO-capturing resumed for %s)"
160
163
% capturing ,
161
164
)
162
- else :
163
- tw .sep (">" , "PDB continue" )
164
165
self ._pytest_capman .resume ()
166
+ else :
167
+ tw .sep (">" , "PDB continue" )
165
168
cls ._pluginmanager .hook .pytest_leave_pdb (
166
169
config = cls ._config , pdb = self
167
170
)
Original file line number Diff line number Diff line change @@ -576,7 +576,8 @@ def test_1():
576
576
child .sendline ("c" )
577
577
child .expect ("LEAVING RECURSIVE DEBUGGER" )
578
578
assert b"PDB continue" not in child .before
579
- assert b"print_from_foo" in child .before
579
+ # No extra newline.
580
+ assert child .before .endswith (b"c\r \n print_from_foo\r \n " )
580
581
child .sendline ("c" )
581
582
child .expect (r"PDB continue \(IO-capturing resumed\)" )
582
583
rest = child .read ().decode ("utf8" )
You can’t perform that action at this time.
0 commit comments