Skip to content

Commit 584b676

Browse files
committed
Explain why we do things
1 parent a065d69 commit 584b676

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pytest_bdd/scenario.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def _execute_step_function(
218218
try:
219219
# Use internal methods without passing redundant arguments
220220
parsed_args = parse_step_arguments(step=step, context=context)
221+
222+
# Filter out the arguments that are not in the function signature
221223
kwargs = {k: v for k, v in parsed_args.items() if k in func_sig.parameters}
222224

223225
if STEP_ARGUMENT_DATATABLE in func_sig.parameters and step.datatable is not None:

0 commit comments

Comments
 (0)