Make test_gdb.test_wrapper_call() make reliable

Issue #29367. Use two break points to prevent breakpoint during Python
initialization.
This commit is contained in:
Victor Stinner 2017-02-01 17:00:32 +01:00
parent 611083331d
commit f94b68a025
1 changed files with 2 additions and 3 deletions

View File

@ -856,13 +856,12 @@ id(42)
def __init__(self):
super().__init__() # wrapper_call()
id("first break point")
l = MyList()
''')
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
breakpoint='wrapper_call',
cmds_after_breakpoint=['py-bt'],
)
cmds_after_breakpoint=['break wrapper_call', 'continue', 'py-bt'])
self.assertIn("<method-wrapper '__init__' of MyList object at ",
gdb_output)