]> granicus.if.org Git - python/commitdiff
Make test_gdb.test_wrapper_call() make reliable
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 16:00:32 +0000 (17:00 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 16:00:32 +0000 (17:00 +0100)
Issue #29367. Use two break points to prevent breakpoint during Python
initialization.

Lib/test/test_gdb.py

index 247c3adeecd20645f120a41667c4ea11dad01a77..681a1ee6cce303a4bdc93c0664f51754fb55df28 100644 (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)