diff --git a/tests/conftest.py b/tests/conftest.py index 637a35a2e..15c6e55c7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,6 +34,12 @@ def _marker_apifun(extra_settings='', } +@pytest.fixture +def testdir(testdir, monkeypatch): + monkeypatch.delenv('PYTEST_ADDOPTS', raising=False) + return testdir + + @pytest.fixture(scope='function') def django_testdir(request, testdir, monkeypatch): marker = request.node.get_closest_marker('django_project') @@ -128,8 +134,6 @@ def create_app_file(code, filename): testdir.create_app_file = create_app_file testdir.project_root = project_root - monkeypatch.delenv('PYTEST_ADDOPTS', raising=False) - testdir.makeini(""" [pytest] addopts = --strict