@@ -77,9 +77,13 @@ def test_pdb_basic_commands():
7777 ... print('...')
7878 ... return foo.upper()
7979
80+ >>> def test_function3(arg=None, *, kwonly=None):
81+ ... pass
82+
8083 >>> def test_function():
8184 ... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
8285 ... ret = test_function_2('baz')
86+ ... test_function3(kwonly=True)
8387 ... print(ret)
8488
8589 >>> with PdbTestInput([ # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
@@ -97,10 +101,13 @@ def test_pdb_basic_commands():
97101 ... 'jump 8', # jump over second for loop
98102 ... 'return', # return out of function
99103 ... 'retval', # display return value
104+ ... 'next', # step to test_function3()
105+ ... 'step', # stepping into test_function3()
106+ ... 'args', # display function args
100107 ... 'continue',
101108 ... ]):
102109 ... test_function()
103- > <doctest test.test_pdb.test_pdb_basic_commands[1 ]>(3)test_function()
110+ > <doctest test.test_pdb.test_pdb_basic_commands[2 ]>(3)test_function()
104111 -> ret = test_function_2('baz')
105112 (Pdb) step
106113 --Call--
@@ -123,14 +130,14 @@ def test_pdb_basic_commands():
123130 [EOF]
124131 (Pdb) bt
125132 ...
126- <doctest test.test_pdb.test_pdb_basic_commands[2 ]>(18 )<module>()
133+ <doctest test.test_pdb.test_pdb_basic_commands[3 ]>(21 )<module>()
127134 -> test_function()
128- <doctest test.test_pdb.test_pdb_basic_commands[1 ]>(3)test_function()
135+ <doctest test.test_pdb.test_pdb_basic_commands[2 ]>(3)test_function()
129136 -> ret = test_function_2('baz')
130137 > <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
131138 -> def test_function_2(foo, bar='default'):
132139 (Pdb) up
133- > <doctest test.test_pdb.test_pdb_basic_commands[1 ]>(3)test_function()
140+ > <doctest test.test_pdb.test_pdb_basic_commands[2 ]>(3)test_function()
134141 -> ret = test_function_2('baz')
135142 (Pdb) down
136143 > <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
@@ -168,6 +175,16 @@ def test_pdb_basic_commands():
168175 -> return foo.upper()
169176 (Pdb) retval
170177 'BAZ'
178+ (Pdb) next
179+ > <doctest test.test_pdb.test_pdb_basic_commands[2]>(4)test_function()
180+ -> test_function3(kwonly=True)
181+ (Pdb) step
182+ --Call--
183+ > <doctest test.test_pdb.test_pdb_basic_commands[1]>(1)test_function3()
184+ -> def test_function3(arg=None, *, kwonly=None):
185+ (Pdb) args
186+ arg = None
187+ kwonly = True
171188 (Pdb) continue
172189 BAZ
173190 """
0 commit comments