finalize 1.12 version, some more adaptation for pytest versions, streamlining tox.ini

This commit is contained in:
holger krekel
2015-05-06 13:41:39 +02:00
parent faf2e0861f
commit 2ea07f73a7
6 changed files with 13 additions and 7 deletions

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -1,2 +1,2 @@
# #
__version__ = '1.11' __version__ = '1.12'

View File

@@ -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