Skip to content

Commit d0d22ba

Browse files
committed
Remove redundant _setup_django call in django_test_environment
This was added in 61372a2, but that was basically reverted in 0e01f05 so is no longer necessary given the call in `pytest_configure`.
1 parent 6cf63b6 commit d0d22ba

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pytest_django/plugin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,7 @@ def get_order_number(test: pytest.Item) -> int:
470470

471471
@pytest.fixture(autouse=True, scope="session")
472472
def django_test_environment(request: pytest.FixtureRequest) -> Generator[None, None, None]:
473-
"""
474-
Ensure that Django is loaded and has its testing environment setup.
473+
"""Setup Django's test environment for the testing session.
475474
476475
XXX It is a little dodgy that this is an autouse fixture. Perhaps
477476
an email fixture should be requested in order to be able to
@@ -481,7 +480,6 @@ def django_test_environment(request: pytest.FixtureRequest) -> Generator[None, N
481480
we need to follow this model.
482481
"""
483482
if django_settings_is_configured():
484-
_setup_django(request.config)
485483
from django.test.utils import setup_test_environment, teardown_test_environment
486484

487485
debug_ini = request.config.getini("django_debug_mode")

0 commit comments

Comments
 (0)