Howto to write a step implementation that supports multiple words
问题 Example Gherkin # Gherkin snip When waiting for 30 seconds # or When waiting for 5 s I want to implement above steps in one step definition. I tried the following step implementation. from behave import * use_step_matcher("re") @when(u"waiting for (?P<time>\d+) (s|seconds)") def step_impl(context, time): pass When running this results in this error: TypeError: step_impl() got multiple values for keyword argument 'time' Behave extracts it as a parameter. What's a good practice for doing this?