Skip to content

Commit f283447

Browse files
committed
tests: django_testdir: use --strict in runpytest_subprocess always
1 parent d8bb4a2 commit f283447

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ def create_app_file(code, filename):
125125

126126
monkeypatch.delenv('PYTEST_ADDOPTS', raising=False)
127127

128+
# Monkeypatch runpytest_subprocess to include --strict always.
129+
orig = testdir.runpytest_subprocess
130+
131+
def runpytest_subprocess(self, *args, **kwargs):
132+
args = ('--strict',) + args
133+
return orig(self, *args, **kwargs)
134+
testdir.runpytest_subprocess = runpytest_subprocess
135+
128136
return testdir
129137

130138

0 commit comments

Comments
 (0)