summaryrefslogtreecommitdiff
path: root/src/_pytest/debugging.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-03-19 00:47:22 +0100
committerDaniel Hahler <git@thequod.de>2019-03-28 11:49:01 +0100
commit40718efaccb701c6458f91da5aa9f6c9d58b9567 (patch)
tree764c84bfee4689a4e6e2bae8d631f33b2227d962 /src/_pytest/debugging.py
parentd406786a8d935cddd9c8b1388535200205527c20 (diff)
downloadpytest-40718efaccb701c6458f91da5aa9f6c9d58b9567.tar.gz
Fix/revisit do_continue with regard to conditions
Diffstat (limited to 'src/_pytest/debugging.py')
-rw-r--r--src/_pytest/debugging.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py
index abe4f65b6..5e859f0e3 100644
--- a/src/_pytest/debugging.py
+++ b/src/_pytest/debugging.py
@@ -146,22 +146,25 @@ class pytestPDB(object):
def do_continue(self, arg):
ret = super(_PdbWrapper, self).do_continue(arg)
- if self._pytest_capman:
+ if cls._recursive_debug == 0:
tw = _pytest.config.create_terminal_writer(cls._config)
tw.line()
- if cls._recursive_debug == 0:
+ if self._pytest_capman:
capturing = self._pytest_capman.is_capturing()
+ else:
+ capturing = False
+ if capturing:
if capturing == "global":
tw.sep(">", "PDB continue (IO-capturing resumed)")
- elif capturing:
+ else:
tw.sep(
">",
"PDB continue (IO-capturing resumed for %s)"
% capturing,
)
- else:
- tw.sep(">", "PDB continue")
self._pytest_capman.resume()
+ else:
+ tw.sep(">", "PDB continue")
cls._pluginmanager.hook.pytest_leave_pdb(
config=cls._config, pdb=self
)