summaryrefslogtreecommitdiff
path: root/src/_pytest/debugging.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-05-09 00:06:36 +0200
committerDaniel Hahler <git@thequod.de>2019-05-09 14:55:55 +0200
commit73b74c74c9674947c8383f657c3a78b1d73ffe1b (patch)
treef2ee28b8c8530aa6674dc7509e1d84f469801468 /src/_pytest/debugging.py
parent5eeb5ee9601b0edf8f979e43cba1da95e1b4058e (diff)
downloadpytest-73b74c74c9674947c8383f657c3a78b1d73ffe1b.tar.gz
pdb: only use outcomes.exit via do_quit
Fixes https://github.com/pytest-dev/pytest/issues/5235.
Diffstat (limited to 'src/_pytest/debugging.py')
-rw-r--r--src/_pytest/debugging.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py
index 7138fd2e1..52c6536f4 100644
--- a/src/_pytest/debugging.py
+++ b/src/_pytest/debugging.py
@@ -181,17 +181,23 @@ class pytestPDB(object):
do_c = do_cont = do_continue
- def set_quit(self):
+ def do_quit(self, arg):
"""Raise Exit outcome when quit command is used in pdb.
This is a bit of a hack - it would be better if BdbQuit
could be handled, but this would require to wrap the
whole pytest run, and adjust the report etc.
"""
- super(PytestPdbWrapper, self).set_quit()
+ ret = super(PytestPdbWrapper, self).do_quit(arg)
+
if cls._recursive_debug == 0:
outcomes.exit("Quitting debugger")
+ return ret
+
+ do_q = do_quit
+ do_exit = do_quit
+
def setup(self, f, tb):
"""Suspend on setup().