]> granicus.if.org Git - python/commitdiff
Fix test_gdb.test_wrapper_call() on Python 2
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 17:26:14 +0000 (18:26 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 17:26:14 +0000 (18:26 +0100)
Issue #29367. On Python 2, __init__ name is render as u'__init__'.

Lib/test/test_gdb.py

index 681a1ee6cce303a4bdc93c0664f51754fb55df28..b7554d698c9d6c549716e4871e7d5005f3b0a0ce 100644 (file)
@@ -862,8 +862,8 @@ id(42)
         # Verify with "py-bt":
         gdb_output = self.get_stack_trace(cmd,
                                           cmds_after_breakpoint=['break wrapper_call', 'continue', 'py-bt'])
-        self.assertIn("<method-wrapper '__init__' of MyList object at ",
-                      gdb_output)
+        self.assertRegex(gdb_output,
+                         r"<method-wrapper u?'__init__' of MyList object at ")
 
 
 class PyPrintTests(DebuggerTests):