I'm trying to pass values to a fixture because I basically have the same code for many tests but only some values changing, for what I understand pytest fixtures don't accept that but not really sure how to solve this , for example I have this:
import pytest
@pytest.fixture
def option_a():
a = 1
b = 2
return print(a + b)
@pytest.fixture
def option_b():
a = 5
b = 3
return print(a + b)
def test_foo(option_b):
pass
instead of choosing between fixture option a or option b , both do adding and the only thing that changes is the values , can I have one fixture where I can set which values I want to run on test_foo?
thanks in advance.