Skip to content

Commit 39ad360

Browse files
committed
Replace pytest.yield_fixture() with plain pytest.fixture()
yield_fixture is a soft-deprecated alias to fixture now.
1 parent 79b7754 commit 39ad360

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ Put this into ``conftest.py``::
333333
conn.close()
334334

335335

336-
@pytest.yield_fixture(scope='session')
336+
@pytest.fixture(scope='session')
337337
def django_db_setup():
338338
from django.conf import settings
339339

pytest_django/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def finalize(self):
355355
del self._to_restore[:]
356356

357357

358-
@pytest.yield_fixture()
358+
@pytest.fixture()
359359
def settings():
360360
"""A Django settings object which restores changes after the testrun"""
361361
skip_if_no_django()

0 commit comments

Comments
 (0)