generally each lettuce test step takes 1 parameter, is there a way to pass in multiple arguments in a single step ?
like, can I have this:
@step('I have the number (\d+) and character (\w+)')
def have_the_number(step, number, character ):
world.number = int(number)
world.character = str(character)
Your code is perfectly valid. You can both positional arguments (like
*args, just like in your example) as well as named ones (like**kwargs).Consider you have the following
math.feature:and such
steps.py:Take a closer look at the subtraction example, it shows how you can refer to captured variables by name rather then by position.