@pytest.yield_fixture is deprecated, use @pytest.fixture
Bad code:
import pytest
@pytest.yield_fixture()
def my_fixture():
obj = SomeClass()
yield obj
obj.cleanup()
Good code:
import pytest
@pytest.fixture()
def my_fixture():
obj = SomeClass()
yield obj
obj.cleanup()
- to avoid using the deprecated function