Skip to content

Commit 1e2dcb3

Browse files
committed
pytest 2.7.x compatibility fix
1 parent 9992ef2 commit 1e2dcb3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ def _marker_apifun(extra_settings='',
3030
}
3131

3232

33+
@pytest.fixture
34+
def testdir(testdir):
35+
# pytest 2.7.x compatibility
36+
if not hasattr(testdir, 'runpytest_subprocess'):
37+
testdir.runpytest_subprocess = testdir.runpytest
38+
39+
return testdir
40+
41+
3342
@pytest.fixture(scope='function')
3443
def django_testdir(request, testdir, monkeypatch):
3544
marker = request.node.get_marker('django_project')

0 commit comments

Comments
 (0)