Closed
Description
We sometimes have fixtures that need to execute in a specific order, without having them include one another as an argument. This is to provide flexibility with fixtures, so they aren't always linked to one another.
Quick example:
@pytest.fixture()
def a():
print "In a"
# Fixture in conftest.py, used in other contexts
@pytest.fixture()
def multi_use():
# Don't always want to use this fixture with 'a', so isn't included as an argument.
print "Should always be executed after 'a', if 'a' is included with the test via usefixtures"
I know there's ways to do this w/ using fixture arguments, like having intermediary fixtures that exist purely to order the other fixtures, but it's not very pretty.