@@ -35,42 +35,40 @@ def test_basic_command(self):
3535 bt = self .get_stack_trace (script = SAMPLE_SCRIPT ,
3636 cmds_after_breakpoint = ['py-list' ])
3737
38- self .assertListing (' 6 \n '
39- ' 7 def bar(a, b, c):\n '
40- ' 8 baz(a, b, c)\n '
41- ' 9 \n '
42- ' 10 def baz(*args):\n '
43- ' >11 _idfunc (42)\n '
44- ' 12 \n '
45- ' 13 foo(1, 2, 3)\n ' ,
38+ self .assertListing (' 5 \n '
39+ ' 6 def bar(a, b, c):\n '
40+ ' 7 baz(a, b, c)\n '
41+ ' 8 \n '
42+ ' 9 def baz(*args):\n '
43+ ' >10 id (42)\n '
44+ ' 11 \n '
45+ ' 12 foo(1, 2, 3)\n ' ,
4646 bt )
4747
4848 def test_one_abs_arg (self ):
4949 'Verify the "py-list" command with one absolute argument'
5050 bt = self .get_stack_trace (script = SAMPLE_SCRIPT ,
5151 cmds_after_breakpoint = ['py-list 9' ])
5252
53- self .assertListing (' 10 def baz(*args):\n '
54- ' >11 _idfunc (42)\n '
55- ' 12 \n '
56- ' 13 foo(1, 2, 3)\n ' ,
53+ self .assertListing (' 9 def baz(*args):\n '
54+ ' >10 id (42)\n '
55+ ' 11 \n '
56+ ' 12 foo(1, 2, 3)\n ' ,
5757 bt )
5858
5959 def test_two_abs_args (self ):
6060 'Verify the "py-list" command with two absolute arguments'
6161 bt = self .get_stack_trace (script = SAMPLE_SCRIPT ,
62- cmds_after_breakpoint = ['py-list 1,4 ' ])
62+ cmds_after_breakpoint = ['py-list 1,3 ' ])
6363
6464 self .assertListing (' 1 # Sample script for use by test_gdb\n '
65- ' 2 from _typing import _idfunc\n '
66- ' 3 \n '
67- ' 4 def foo(a, b, c):\n ' ,
65+ ' 2 \n '
66+ ' 3 def foo(a, b, c):\n ' ,
6867 bt )
6968
7069SAMPLE_WITH_C_CALL = """
7170
7271from _testcapi import pyobject_vectorcall
73- from _typing import _idfunc
7472
7573def foo(a, b, c):
7674 bar(a, b, c)
@@ -79,7 +77,7 @@ def bar(a, b, c):
7977 pyobject_vectorcall(baz, (a, b, c), None)
8078
8179def baz(*args):
82- _idfunc (42)
80+ id (42)
8381
8482foo(1, 2, 3)
8583
@@ -96,7 +94,7 @@ def test_pyup_command(self):
9694 cmds_after_breakpoint = ['py-up' , 'py-up' ])
9795 self .assertMultilineMatches (bt ,
9896 r'''^.*
99- #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 13 , in baz \(args=\(1, 2, 3\)\)
97+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12 , in baz \(args=\(1, 2, 3\)\)
10098#[0-9]+ <built-in method pyobject_vectorcall of module object at remote 0x[0-9a-f]+>
10199$''' )
102100
@@ -125,9 +123,9 @@ def test_up_then_down(self):
125123 cmds_after_breakpoint = ['py-up' , 'py-up' , 'py-down' ])
126124 self .assertMultilineMatches (bt ,
127125 r'''^.*
128- #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 13 , in baz \(args=\(1, 2, 3\)\)
126+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12 , in baz \(args=\(1, 2, 3\)\)
129127#[0-9]+ <built-in method pyobject_vectorcall of module object at remote 0x[0-9a-f]+>
130- #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 13 , in baz \(args=\(1, 2, 3\)\)
128+ #[0-9]+ Frame 0x-?[0-9a-f]+, for file <string>, line 12 , in baz \(args=\(1, 2, 3\)\)
131129$''' )
132130
133131class PyPrintTests (DebuggerTests ):
0 commit comments