-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivityreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytopic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity
Description
In version of pytest 3.5.0 appeared execution of fixtures by higher scope. #3306
But I need to use autouse fixture with scope=function first, at least before fixtures with other scope and without autouse. There are any possibilities to do this?
def test_1(fixture_module):
assert True
@pytest.fixture(autouse=True, scope="function")
def fixture_function():
print("scope function")
@pytest.fixture(scope="module")
def fixture_module():
print("scope module")
Code output:
scope module
scope function
pytest version 3.6.0
On version 3.2.2 this example work in this order:
scope function
scope module
Metadata
Metadata
Assignees
Labels
status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivityreporter needs to provide more information; can be closed after 2 or more weeks of inactivitytopic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: questiongeneral question, might be closed after 2 weeks of inactivitygeneral question, might be closed after 2 weeks of inactivity