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):
154
154
def pytest_addhooks (pluginmanager ):
155
155
from xdist import newhooks
156
156
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 )
162
158
163
159
164
160
# -------------------------------------------------------------------------
Original file line number Diff line number Diff line change
1
+ import six
1
2
import py
2
3
import pytest
3
4
import execnet
4
5
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
-
15
6
pytest_plugins = "pytester"
16
7
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
18
17
19
18
20
19
@pytest .fixture (autouse = True )
@@ -45,14 +44,6 @@ def specssh(request):
45
44
return getspecssh (request .config )
46
45
47
46
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
-
56
47
# configuration information for tests
57
48
def getgspecs (config ):
58
49
return [execnet .XSpec (spec ) for spec in config .getvalueorskip ("gspecs" )]
You can’t perform that action at this time.
0 commit comments