I'm trying to create a fixture that has dependencies on other fixtures and is also parameterized. Example:
@pytest.fixture(scope="module")
def fix1():
...
@pytest.fixture(scope="module", params=[False, True])
def fix2(fix1, param):
...
which gives me the error: fixture 'param' not found
.
I've tried using a default arg
@pytest.fixture(scope="module", params=[False, True])
def fix2(fix1, param=True):
...
but this just ends up with the fixture always receiving True
no matter the parameter. @pytest.mark.parameterize(..., indirect=True)
on the test also just ends up with the same result as the above.