@@ -86,12 +86,12 @@ def argument_passing(
86
86
87
87
@expects (7 )
88
88
def test_argument_passing1 ():
89
- argument_passing (arg1 , * (arg2 , arg3 , arg4 ), e = arg5 , ** {"f" : arg6 , "g" : arg7 })
89
+ argument_passing (arg1 , * (arg2 , arg3 , arg4 ), e = arg5 , ** {"f" : arg6 , "g" : arg7 }) #$ arg1 arg7 func=argument_passing MISSING: arg2 arg3="arg3 arg4 arg5 arg6
90
90
91
91
92
92
@expects (7 )
93
93
def test_argument_passing2 ():
94
- argument_passing (arg1 , arg2 , arg3 , f = arg6 )
94
+ argument_passing (arg1 , arg2 , arg3 , f = arg6 ) #$ arg1 arg2 arg3
95
95
96
96
97
97
def with_pos_only (a , / , b ):
@@ -101,9 +101,9 @@ def with_pos_only(a, /, b):
101
101
102
102
@expects (6 )
103
103
def test_pos_only ():
104
- with_pos_only (arg1 , arg2 )
105
- with_pos_only (arg1 , b = arg2 )
106
- with_pos_only (arg1 , * (arg2 ,))
104
+ with_pos_only (arg1 , arg2 ) #$ arg1 arg2
105
+ with_pos_only (arg1 , b = arg2 ) #$ arg1 arg2
106
+ with_pos_only (arg1 , * (arg2 ,)) #$ arg1 MISSING: arg2
107
107
108
108
109
109
def with_multiple_kw_args (a , b , c ):
@@ -114,13 +114,13 @@ def with_multiple_kw_args(a, b, c):
114
114
115
115
@expects (12 )
116
116
def test_multiple_kw_args ():
117
- with_multiple_kw_args (b = arg2 , c = arg3 , a = arg1 )
118
- with_multiple_kw_args (arg1 , * (arg2 ,), arg3 )
119
- with_multiple_kw_args (arg1 , ** {"c" : arg3 }, b = arg2 )
120
- with_multiple_kw_args (** {"b" : arg2 }, ** {"c" : arg3 }, ** {"a" : arg1 })
117
+ with_multiple_kw_args (b = arg2 , c = arg3 , a = arg1 ) #$ arg1 arg2 arg3
118
+ with_multiple_kw_args (arg1 , * (arg2 ,), arg3 ) #$ arg1 MISSING: arg2 arg3
119
+ with_multiple_kw_args (arg1 , ** {"c" : arg3 }, b = arg2 ) #$ arg1 arg3 func=with_multiple_kw_args MISSING: arg2
120
+ with_multiple_kw_args (** {"b" : arg2 }, ** {"c" : arg3 }, ** {"a" : arg1 }) #$ arg1 arg2 arg3 func=with_multiple_kw_args
121
121
122
122
123
- def with_default_arguments (a = arg1 , b = arg2 , c = arg3 ):
123
+ def with_default_arguments (a = arg1 , b = arg2 , c = arg3 ): # Need a mechanism to test default arguments
124
124
SINK1 (a )
125
125
SINK2 (b )
126
126
SINK3 (c )
@@ -129,9 +129,9 @@ def with_default_arguments(a=arg1, b=arg2, c=arg3):
129
129
@expects (12 )
130
130
def test_default_arguments ():
131
131
with_default_arguments ()
132
- with_default_arguments (arg1 )
133
- with_default_arguments (b = arg2 )
134
- with_default_arguments (** {"c" : arg3 })
132
+ with_default_arguments (arg1 ) #$ arg1
133
+ with_default_arguments (b = arg2 ) #$ arg2
134
+ with_default_arguments (** {"c" : arg3 }) #$ arg3 func=with_default_arguments
135
135
136
136
137
137
# Nested constructor pattern
@@ -157,55 +157,55 @@ def grab_baz(baz):
157
157
158
158
@expects (4 )
159
159
def test_grab ():
160
- grab_foo_bar_baz (baz = arg3 , bar = arg2 , foo = arg1 )
160
+ grab_foo_bar_baz (baz = arg3 , bar = arg2 , foo = arg1 ) #$ arg1 arg2 arg3 func=grab_bar_baz func=grab_baz
161
161
162
162
163
163
# All combinations
164
164
def test_pos_pos ():
165
165
def with_pos (a ):
166
166
SINK1 (a )
167
167
168
- with_pos (arg1 )
168
+ with_pos (arg1 ) #$ arg1 func=test_pos_pos.with_pos
169
169
170
170
171
171
def test_pos_pos_only ():
172
172
def with_pos_only (a , / ):
173
173
SINK1 (a )
174
174
175
- with_pos_only (arg1 )
175
+ with_pos_only (arg1 ) #$ arg1 func=test_pos_pos_only.with_pos_only
176
176
177
177
178
178
def test_pos_star ():
179
179
def with_star (* a ):
180
180
if len (a ) > 0 :
181
181
SINK1 (a [0 ])
182
182
183
- with_star (arg1 )
183
+ with_star (arg1 ) #$ arg1 func=test_pos_star.with_star
184
184
185
185
186
186
def test_pos_kw ():
187
187
def with_kw (a = "" ):
188
188
SINK1 (a )
189
189
190
- with_kw (arg1 )
190
+ with_kw (arg1 ) #$ arg1 func=test_pos_kw.with_kw
191
191
192
192
193
193
def test_kw_pos ():
194
194
def with_pos (a ):
195
195
SINK1 (a )
196
196
197
- with_pos (a = arg1 )
197
+ with_pos (a = arg1 ) #$ arg1 func=test_kw_pos.with_pos
198
198
199
199
200
200
def test_kw_kw ():
201
201
def with_kw (a = "" ):
202
202
SINK1 (a )
203
203
204
- with_kw (a = arg1 )
204
+ with_kw (a = arg1 ) #$ arg1 func=test_kw_kw.with_kw
205
205
206
206
207
207
def test_kw_doublestar ():
208
208
def with_doublestar (** a ):
209
209
SINK1 (a ["a" ])
210
210
211
- with_doublestar (a = arg1 )
211
+ with_doublestar (a = arg1 ) #$ arg1 func=test_kw_doublestar.with_doublestar
0 commit comments