Skip to content

Commit d5ecbcc

Browse files
committed
Revert inheriting from bdb.BdbQuit
1 parent ad71b38 commit d5ecbcc

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/_pytest/debugging.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,24 +168,8 @@ def pytest_internalerror(self, excrepr, excinfo):
168168
class PdbTrace(object):
169169
@hookimpl(hookwrapper=True)
170170
def pytest_pyfunc_call(self, pyfuncitem):
171-
# Monkeypatch bdb.BdbQuit to make bdb.runcall not swallow it.
172-
class IgnoreBdbQuit(Exception):
173-
"""Monkeypatch bdb.BdbQuit to make"""
174-
175-
pass
176-
177-
import bdb
178-
179-
orig_BdbQuit = bdb.BdbQuit
180-
bdb.BdbQuit = IgnoreBdbQuit
181-
182-
try:
183-
_test_pytest_function(pyfuncitem)
184-
185-
yield
186-
187-
finally:
188-
bdb.BdbQuit = orig_BdbQuit
171+
_test_pytest_function(pyfuncitem)
172+
yield
189173

190174

191175
def _test_pytest_function(pyfuncitem):

src/_pytest/outcomes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from __future__ import division
77
from __future__ import print_function
88

9-
import bdb
109
import sys
1110

1211

@@ -50,7 +49,7 @@ class Failed(OutcomeException):
5049
__module__ = "builtins"
5150

5251

53-
class Exit(bdb.BdbQuit):
52+
class Exit(Exception):
5453
""" raised for immediate program exits (no tracebacks/summaries)"""
5554

5655
def __init__(self, msg="unknown reason", returncode=None):

0 commit comments

Comments
 (0)