File tree Expand file tree Collapse file tree 2 files changed +11
-24
lines changed Expand file tree Collapse file tree 2 files changed +11
-24
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,7 @@ def pytest_addoption(parser):
154154def pytest_addhooks (pluginmanager ):
155155 from xdist import newhooks
156156
157- # avoid warnings with pytest-2.8
158- method = getattr (pluginmanager , "add_hookspecs" , None )
159- if method is None :
160- method = pluginmanager .addhooks
161- method (newhooks )
157+ pluginmanager .add_hookspecs (newhooks )
162158
163159
164160# -------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1+ import six
12import py
23import pytest
34import execnet
45
5-
6- @pytest .fixture (scope = "session" , autouse = True )
7- def _ensure_imports ():
8- # we import some modules because pytest-2.8's testdir fixture
9- # will unload all modules after each test and this cause
10- # (unknown) problems with execnet.Group()
11- execnet .Group
12- execnet .makegateway
13-
14-
156pytest_plugins = "pytester"
167
17- # rsyncdirs = ['.', '../xdist', py.path.local(execnet.__file__).dirpath()]
8+ if six .PY2 :
9+
10+ @pytest .fixture (scope = "session" , autouse = True )
11+ def _ensure_imports ():
12+ # we import some modules because pytest-2.8's testdir fixture
13+ # will unload all modules after each test and this cause
14+ # (unknown) problems with execnet.Group()
15+ execnet .Group
16+ execnet .makegateway
1817
1918
2019@pytest .fixture (autouse = True )
@@ -45,14 +44,6 @@ def specssh(request):
4544 return getspecssh (request .config )
4645
4746
48- @pytest .fixture
49- def testdir (testdir ):
50- # pytest before 2.8 did not have a runpytest_subprocess
51- if not hasattr (testdir , "runpytest_subprocess" ):
52- testdir .runpytest_subprocess = testdir .runpytest
53- return testdir
54-
55-
5647# configuration information for tests
5748def getgspecs (config ):
5849 return [execnet .XSpec (spec ) for spec in config .getvalueorskip ("gspecs" )]
You can’t perform that action at this time.
0 commit comments