finalize 1.12 version, some more adaptation for pytest versions, streamlining tox.ini
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
1.12.dev
|
1.12
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
- fix issue594: properly report errors when the test collection
|
- fix issue594: properly report errors when the test collection
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pytest-xdist",
|
name="pytest-xdist",
|
||||||
version='1.11',
|
version='1.12',
|
||||||
description='py.test xdist plugin for distributed testing and loop-on-failing modes',
|
description='py.test xdist plugin for distributed testing and loop-on-failing modes',
|
||||||
long_description=open('README.txt').read(),
|
long_description=open('README.txt').read(),
|
||||||
license='MIT',
|
license='MIT',
|
||||||
|
|||||||
@@ -2,13 +2,15 @@ import py
|
|||||||
import pytest
|
import pytest
|
||||||
import execnet
|
import execnet
|
||||||
from _pytest.pytester import HookRecorder
|
from _pytest.pytester import HookRecorder
|
||||||
from xdist import slavemanage
|
from xdist import slavemanage, newhooks
|
||||||
from xdist.slavemanage import HostRSync, NodeManager
|
from xdist.slavemanage import HostRSync, NodeManager
|
||||||
|
|
||||||
pytest_plugins = "pytester",
|
pytest_plugins = "pytester"
|
||||||
|
|
||||||
def pytest_funcarg__hookrecorder(request, config):
|
def pytest_funcarg__hookrecorder(request, config):
|
||||||
hookrecorder = HookRecorder(config.pluginmanager)
|
hookrecorder = HookRecorder(config.pluginmanager)
|
||||||
|
if hasattr(hookrecorder, "start_recording"):
|
||||||
|
hookrecorder.start_recording(newhooks)
|
||||||
request.addfinalizer(hookrecorder.finish_recording)
|
request.addfinalizer(hookrecorder.finish_recording)
|
||||||
return hookrecorder
|
return hookrecorder
|
||||||
|
|
||||||
|
|||||||
2
tox.ini
2
tox.ini
@@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist=py26,py33,py34,py27,py27-pexpect,py33-pexpect,py26,py26-old,py33-old,flakes
|
envlist=py26,py33,py34,py27,py27-pexpect,py33-pexpect,py26-old,py33-old,flakes
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
changedir=testing
|
changedir=testing
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#
|
#
|
||||||
__version__ = '1.11'
|
__version__ = '1.12'
|
||||||
|
|||||||
@@ -45,7 +45,11 @@ def pytest_addoption(parser):
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
def pytest_addhooks(pluginmanager):
|
def pytest_addhooks(pluginmanager):
|
||||||
from xdist import newhooks
|
from xdist import newhooks
|
||||||
pluginmanager.addhooks(newhooks)
|
# avoid warnings with pytest-2.8
|
||||||
|
method = getattr(pluginmanager, "add_hookspecs", None)
|
||||||
|
if method is None:
|
||||||
|
method = pluginmanager.addhooks
|
||||||
|
method(newhooks)
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# distributed testing initialization
|
# distributed testing initialization
|
||||||
|
|||||||
Reference in New Issue
Block a user