Skip to content

Commit d57e0a0

Browse files
authored
tests: delete PYTEST_ADDOPTS in testdir already (#655)
1 parent 0d9c7b1 commit d57e0a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ def _marker_apifun(extra_settings='',
3434
}
3535

3636

37+
@pytest.fixture
38+
def testdir(testdir, monkeypatch):
39+
monkeypatch.delenv('PYTEST_ADDOPTS', raising=False)
40+
return testdir
41+
42+
3743
@pytest.fixture(scope='function')
3844
def django_testdir(request, testdir, monkeypatch):
3945
marker = request.node.get_closest_marker('django_project')
@@ -128,8 +134,6 @@ def create_app_file(code, filename):
128134
testdir.create_app_file = create_app_file
129135
testdir.project_root = project_root
130136

131-
monkeypatch.delenv('PYTEST_ADDOPTS', raising=False)
132-
133137
testdir.makeini("""
134138
[pytest]
135139
addopts = --strict

0 commit comments

Comments
 (0)