conditional for resetting of sys.breakpointhook for cleanup where breakpoint() not supported

This commit is contained in:
Anthony Shaw 2018-03-23 14:26:16 +11:00
parent 21ada0fa23
commit 0e83e4f292
No known key found for this signature in database
GPG Key ID: AB4A19AE1CE85744
1 changed files with 2 additions and 1 deletions

View File

@ -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