Skip to content

Commit 5a1c3c0

Browse files
committed
added varargs test
1 parent d257560 commit 5a1c3c0

2 files changed

Lines changed: 271 additions & 0 deletions

File tree

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
{
2+
"code": "def parrot(mandatory, mandatory2, *args, **kwargs):\n pass\n\nparrot('a', 'b', 'c', 'd', 'e', name='Philip', age='35')\n",
3+
"trace": [
4+
{
5+
"ordered_globals": [],
6+
"stdout": "",
7+
"func_name": "<module>",
8+
"stack_to_render": [],
9+
"globals": {},
10+
"heap": {},
11+
"line": 1,
12+
"event": "step_line"
13+
},
14+
{
15+
"ordered_globals": [
16+
"parrot"
17+
],
18+
"stdout": "",
19+
"func_name": "<module>",
20+
"stack_to_render": [],
21+
"globals": {
22+
"parrot": [
23+
"REF",
24+
1
25+
]
26+
},
27+
"heap": {
28+
"1": [
29+
"FUNCTION",
30+
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
31+
null
32+
]
33+
},
34+
"line": 4,
35+
"event": "step_line"
36+
},
37+
{
38+
"ordered_globals": [
39+
"parrot"
40+
],
41+
"stdout": "",
42+
"func_name": "parrot",
43+
"stack_to_render": [
44+
{
45+
"frame_id": 1,
46+
"encoded_locals": {
47+
"args": [
48+
"REF",
49+
3
50+
],
51+
"mandatory": "a",
52+
"mandatory2": "b",
53+
"kwargs": [
54+
"REF",
55+
2
56+
]
57+
},
58+
"is_highlighted": true,
59+
"is_parent": false,
60+
"func_name": "parrot",
61+
"is_zombie": false,
62+
"parent_frame_id_list": [],
63+
"unique_hash": "parrot_f1",
64+
"ordered_varnames": [
65+
"mandatory",
66+
"mandatory2",
67+
"args",
68+
"kwargs"
69+
]
70+
}
71+
],
72+
"globals": {
73+
"parrot": [
74+
"REF",
75+
1
76+
]
77+
},
78+
"heap": {
79+
"1": [
80+
"FUNCTION",
81+
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
82+
null
83+
],
84+
"2": [
85+
"DICT",
86+
[
87+
"age",
88+
"35"
89+
],
90+
[
91+
"name",
92+
"Philip"
93+
]
94+
],
95+
"3": [
96+
"TUPLE",
97+
"c",
98+
"d",
99+
"e"
100+
]
101+
},
102+
"line": 1,
103+
"event": "call"
104+
},
105+
{
106+
"ordered_globals": [
107+
"parrot"
108+
],
109+
"stdout": "",
110+
"func_name": "parrot",
111+
"stack_to_render": [
112+
{
113+
"frame_id": 1,
114+
"encoded_locals": {
115+
"args": [
116+
"REF",
117+
3
118+
],
119+
"mandatory": "a",
120+
"mandatory2": "b",
121+
"kwargs": [
122+
"REF",
123+
2
124+
]
125+
},
126+
"is_highlighted": true,
127+
"is_parent": false,
128+
"func_name": "parrot",
129+
"is_zombie": false,
130+
"parent_frame_id_list": [],
131+
"unique_hash": "parrot_f1",
132+
"ordered_varnames": [
133+
"mandatory",
134+
"mandatory2",
135+
"args",
136+
"kwargs"
137+
]
138+
}
139+
],
140+
"globals": {
141+
"parrot": [
142+
"REF",
143+
1
144+
]
145+
},
146+
"heap": {
147+
"1": [
148+
"FUNCTION",
149+
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
150+
null
151+
],
152+
"2": [
153+
"DICT",
154+
[
155+
"age",
156+
"35"
157+
],
158+
[
159+
"name",
160+
"Philip"
161+
]
162+
],
163+
"3": [
164+
"TUPLE",
165+
"c",
166+
"d",
167+
"e"
168+
]
169+
},
170+
"line": 2,
171+
"event": "step_line"
172+
},
173+
{
174+
"ordered_globals": [
175+
"parrot"
176+
],
177+
"stdout": "",
178+
"func_name": "parrot",
179+
"stack_to_render": [
180+
{
181+
"frame_id": 1,
182+
"encoded_locals": {
183+
"__return__": null,
184+
"args": [
185+
"REF",
186+
3
187+
],
188+
"mandatory": "a",
189+
"mandatory2": "b",
190+
"kwargs": [
191+
"REF",
192+
2
193+
]
194+
},
195+
"is_highlighted": true,
196+
"is_parent": false,
197+
"func_name": "parrot",
198+
"is_zombie": false,
199+
"parent_frame_id_list": [],
200+
"unique_hash": "parrot_f1",
201+
"ordered_varnames": [
202+
"mandatory",
203+
"mandatory2",
204+
"args",
205+
"kwargs",
206+
"__return__"
207+
]
208+
}
209+
],
210+
"globals": {
211+
"parrot": [
212+
"REF",
213+
1
214+
]
215+
},
216+
"heap": {
217+
"1": [
218+
"FUNCTION",
219+
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
220+
null
221+
],
222+
"2": [
223+
"DICT",
224+
[
225+
"age",
226+
"35"
227+
],
228+
[
229+
"name",
230+
"Philip"
231+
]
232+
],
233+
"3": [
234+
"TUPLE",
235+
"c",
236+
"d",
237+
"e"
238+
]
239+
},
240+
"line": 2,
241+
"event": "return"
242+
},
243+
{
244+
"ordered_globals": [
245+
"parrot"
246+
],
247+
"stdout": "",
248+
"func_name": "<module>",
249+
"stack_to_render": [],
250+
"globals": {
251+
"parrot": [
252+
"REF",
253+
1
254+
]
255+
},
256+
"heap": {
257+
"1": [
258+
"FUNCTION",
259+
"parrot(mandatory, mandatory2, *a, *r, *g, *s, **k, **w, **a, **r, **g, **s)",
260+
null
261+
]
262+
},
263+
"line": 4,
264+
"event": "return"
265+
}
266+
]
267+
}

‎v3/tests/backend-tests/varargs.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def parrot(mandatory, mandatory2, *args, **kwargs):
2+
pass
3+
4+
parrot('a', 'b', 'c', 'd', 'e', name='Philip', age='35')

0 commit comments

Comments
 (0)