Closed
Description
Could you please implement possibility to pass parameter from one fixture to the parent one?
I have a complex fixture hierarchy in my test framework. I have some cases when i really need to have this feature.
Example:
@pytest.fixture(scope='session')
def fixture_1(request):
return request.param
@pytest.fixture
def fixture_2(fixture_1): # Need to pass parameter here to fixture_1
print (fixture_1)
So far I can pass parameter to the fixture from test using:
@pytest.mark.parametrize('fixture_1', ['parameter'], indirect=True)
def test_1(fixture_1):
print (fixture_1)
Need to have exactly the same thing from fixture.
Thank you!