-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
type: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity
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!
regisz, kevinisaac, techdragon, birnbaum, vliao-semios and 3 more
Metadata
Metadata
Assignees
Labels
type: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity