summaryrefslogtreecommitdiff
path: root/src/_pytest/debugging.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-03-21 07:22:15 +0100
committerDaniel Hahler <git@thequod.de>2019-03-29 11:02:34 +0100
commit401102182395626e8a00af83e866953a4c78d566 (patch)
tree5159dc6a15847037984e3e21258f856fc30ee29b /src/_pytest/debugging.py
parent6b5cddc48a194be365bfe3299b405131744f6765 (diff)
downloadpytest-401102182395626e8a00af83e866953a4c78d566.tar.gz
pdb: do not raise outcomes.Exit with quit in debug
Diffstat (limited to 'src/_pytest/debugging.py')
-rw-r--r--src/_pytest/debugging.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py
index bb90d00ca..cb1c964c3 100644
--- a/src/_pytest/debugging.py
+++ b/src/_pytest/debugging.py
@@ -176,8 +176,15 @@ class pytestPDB(object):
do_c = do_cont = do_continue
def set_quit(self):
+ """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(_PdbWrapper, self).set_quit()
- outcomes.exit("Quitting debugger")
+ if cls._recursive_debug == 0:
+ outcomes.exit("Quitting debugger")
def setup(self, f, tb):
"""Suspend on setup().