@@ -77,9 +77,13 @@ def test_pdb_basic_commands():
77
77
... print('...')
78
78
... return foo.upper()
79
79
80
+ >>> def test_function3(arg=None, *, kwonly=None):
81
+ ... pass
82
+
80
83
>>> def test_function():
81
84
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
82
85
... ret = test_function_2('baz')
86
+ ... test_function3(kwonly=True)
83
87
... print(ret)
84
88
85
89
>>> with PdbTestInput([ # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
@@ -97,10 +101,13 @@ def test_pdb_basic_commands():
97
101
... 'jump 8', # jump over second for loop
98
102
... 'return', # return out of function
99
103
... 'retval', # display return value
104
+ ... 'next', # step to test_function3()
105
+ ... 'step', # stepping into test_function3()
106
+ ... 'args', # display function args
100
107
... 'continue',
101
108
... ]):
102
109
... 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()
104
111
-> ret = test_function_2('baz')
105
112
(Pdb) step
106
113
--Call--
@@ -123,14 +130,14 @@ def test_pdb_basic_commands():
123
130
[EOF]
124
131
(Pdb) bt
125
132
...
126
- <doctest test.test_pdb.test_pdb_basic_commands[2 ]>(18 )<module>()
133
+ <doctest test.test_pdb.test_pdb_basic_commands[3 ]>(21 )<module>()
127
134
-> 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()
129
136
-> ret = test_function_2('baz')
130
137
> <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
131
138
-> def test_function_2(foo, bar='default'):
132
139
(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()
134
141
-> ret = test_function_2('baz')
135
142
(Pdb) down
136
143
> <doctest test.test_pdb.test_pdb_basic_commands[0]>(1)test_function_2()
@@ -168,6 +175,16 @@ def test_pdb_basic_commands():
168
175
-> return foo.upper()
169
176
(Pdb) retval
170
177
'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
171
188
(Pdb) continue
172
189
BAZ
173
190
"""
0 commit comments