I want to change the x from one step to the other, without adding another function
Feature: Calculator
Scenario Outline: simple sum
Given the x is 1
And the x is <x>
Examples:
| x |
| 5 |
from pytest_bdd import given, when, then, scenario, parsers
import logging
info = logging.getLogger('test').info
@scenario("test.feature", "simple sum")
def test_outlined():
pass
@given(parsers.parse("the x is {x}"))
@given("the x is <x>")
def f(request, x):
info("x=%s" % x)
output:
2021-08-31 14:23:30 INFO x=1
2021-08-31 14:23:30 INFO x=1
wanted output:
2021-08-31 14:23:30 INFO x=1
2021-08-31 14:23:30 INFO x=5
thank you so much, please help