summaryrefslogtreecommitdiff
path: root/_pytest
diff options
context:
space:
mode:
authorAnthony Shaw <anthonyshaw@apache.org>2018-03-23 14:26:16 +1100
committerAnthony Shaw <anthonyshaw@apache.org>2018-03-23 14:26:16 +1100
commit0e83e4f292a44ee86e6974dc30c652fa0bba5172 (patch)
tree0a7c4696e1e25dd07488b316ecb74ecb9878ac0a /_pytest
parent21ada0fa23d20dcc2945ecb3f8ef5c62a96deac3 (diff)
downloadpytest-0e83e4f292a44ee86e6974dc30c652fa0bba5172.tar.gz
conditional for resetting of sys.breakpointhook for cleanup where breakpoint() not supported
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/debugging.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/_pytest/debugging.py b/_pytest/debugging.py
index f73a9a6b9..68663490d 100644
--- a/_pytest/debugging.py
+++ b/_pytest/debugging.py
@@ -46,7 +46,8 @@ def pytest_configure(config):
pdb.set_trace, pytestPDB._pluginmanager = old
pytestPDB._config = None
pytestPDB._pdb_cls = pdb.Pdb
- sys.breakpointhook = sys.__breakpointhook__
+ if SUPPORTS_BREAKPOINT_BUILTIN:
+ sys.breakpointhook = sys.__breakpointhook__
pdb.set_trace = pytestPDB.set_trace
pytestPDB._pluginmanager = config.pluginmanager