tests: fix test_pdb_interaction_continue_recursive with pdbpp

This commit is contained in:
Daniel Hahler 2019-03-14 18:32:42 +01:00
parent 612c3784e5
commit 37158f5303
1 changed files with 2 additions and 4 deletions

View File

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