File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -205,18 +205,6 @@ def _execute_step_function(
205
205
206
206
func_sig = signature (context .step_func )
207
207
208
- def _get_argument_values (kwargs : dict ) -> dict :
209
- """Get default values or request fixture values for missing arguments."""
210
- for arg in get_args (context .step_func ):
211
- if arg not in kwargs :
212
- param = func_sig .parameters .get (arg )
213
- if param :
214
- if param .default != param .empty :
215
- kwargs [arg ] = param .default
216
- else :
217
- kwargs [arg ] = request .getfixturevalue (arg )
218
- return kwargs
219
-
220
208
kw = {
221
209
"request" : request ,
222
210
"feature" : scenario .feature ,
@@ -237,7 +225,8 @@ def _get_argument_values(kwargs: dict) -> dict:
237
225
if STEP_ARGUMENT_DOCSTRING in func_sig .parameters and step .docstring is not None :
238
226
kwargs [STEP_ARGUMENT_DOCSTRING ] = step .docstring
239
227
240
- kwargs = _get_argument_values (kwargs )
228
+ # Fill the missing arguments requesting the fixture values
229
+ kwargs |= {arg : request .getfixturevalue (arg ) for arg in get_args (context .step_func ) if arg not in kwargs }
241
230
242
231
kw ["step_func_args" ] = kwargs
243
232
You can’t perform that action at this time.
0 commit comments