Fixture Autouse with yield
import pytest
@pytest.fixture(autouse = True)
def configuration():
print("Before")
yield
print("After")
def test_app():
print("In test")
assert True
$ pytest -sq
Before
In test
.After
1 passed in 0.02 seconds