summaryrefslogtreecommitdiff
path: root/testing/test_pdb.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-03-14 18:32:42 +0100
committerDaniel Hahler <git@thequod.de>2019-03-14 19:16:34 +0100
commit37158f530367180edcd905da4a3f576b643cba23 (patch)
treea7718f21e6711a3273b82cfbe6469af6cba66a47 /testing/test_pdb.py
parent612c3784e5be4a7fa45ac3b901e9a28be1511024 (diff)
downloadpytest-37158f530367180edcd905da4a3f576b643cba23.tar.gz
tests: fix test_pdb_interaction_continue_recursive with pdbpp
Diffstat (limited to 'testing/test_pdb.py')
-rw-r--r--testing/test_pdb.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/test_pdb.py b/testing/test_pdb.py
index 43d640614..0b92aa356 100644
--- a/testing/test_pdb.py
+++ b/testing/test_pdb.py
@@ -528,15 +528,13 @@ class TestPDB(object):
import sys
import types
- newglobals = {
- 'Pdb': self.__class__, # NOTE: different with pdb.Pdb
- 'sys': sys,
- }
if sys.version_info < (3, ):
do_debug_func = pdb.Pdb.do_debug.im_func
else:
do_debug_func = pdb.Pdb.do_debug
+ newglobals = do_debug_func.__globals__.copy()
+ newglobals['Pdb'] = self.__class__
orig_do_debug = types.FunctionType(
do_debug_func.__code__, newglobals,
do_debug_func.__name__, do_debug_func.__defaults__,