mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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:
parent
611083331d
commit
f94b68a025
1 changed files with 2 additions and 3 deletions
|
|
@ -856,13 +856,12 @@ id(42)
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__() # wrapper_call()
|
super().__init__() # wrapper_call()
|
||||||
|
|
||||||
|
id("first break point")
|
||||||
l = MyList()
|
l = MyList()
|
||||||
''')
|
''')
|
||||||
# Verify with "py-bt":
|
# Verify with "py-bt":
|
||||||
gdb_output = self.get_stack_trace(cmd,
|
gdb_output = self.get_stack_trace(cmd,
|
||||||
breakpoint='wrapper_call',
|
cmds_after_breakpoint=['break wrapper_call', 'continue', 'py-bt'])
|
||||||
cmds_after_breakpoint=['py-bt'],
|
|
||||||
)
|
|
||||||
self.assertIn("<method-wrapper '__init__' of MyList object at ",
|
self.assertIn("<method-wrapper '__init__' of MyList object at ",
|
||||||
gdb_output)
|
gdb_output)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue