Skip to content

Commit cd471db

Browse files
author
yunusyun
committed
fix: defalut value not covered by parameters passed through feature file
1 parent 4d995b2 commit cd471db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pytest_bdd/scenario.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,9 @@ def _execute_step_function(
210210
if step.docstring is not None:
211211
kwargs["docstring"] = step.docstring
212212

213-
kwargs = {arg: kwargs[arg] if arg in kwargs else request.getfixturevalue(arg) for arg in args}
213+
for arg in args:
214+
if arg not in kwargs:
215+
kwargs[arg] = request.getfixturevalue(arg)
214216

215217
kw["step_func_args"] = kwargs
216218

0 commit comments

Comments
 (0)