fix issue34
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
1.6 (dev)
|
||||
-------------------------
|
||||
|
||||
- terser collection reporting
|
||||
|
||||
- fix issue34 - distributed testing with -p plugin now works correctly
|
||||
|
||||
1.5
|
||||
-------------------------
|
||||
|
||||
|
||||
4
setup.py
4
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
|
||||
|
||||
setup(
|
||||
name="pytest-xdist",
|
||||
version='1.6.dev2',
|
||||
version='1.6.dev3',
|
||||
description='py.test xdist plugin for distributed testing and loop-on-failing modes',
|
||||
long_description=open('README.txt').read(),
|
||||
license='GPLv2 or later',
|
||||
@@ -13,7 +13,7 @@ setup(
|
||||
packages = ['xdist'],
|
||||
entry_points = {'pytest11': ['xdist = xdist.plugin'],},
|
||||
zip_safe=False,
|
||||
install_requires = ['execnet>=1.0.8', 'pytest>1.9.9'],
|
||||
install_requires = ['execnet>=1.0.8', 'pytest>2.0.2'],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
|
||||
@@ -407,5 +407,18 @@ def test_skipping(testdir):
|
||||
"*1 skipped*"
|
||||
])
|
||||
|
||||
|
||||
|
||||
def test_issue34_pluginloading_in_subprocess(testdir):
|
||||
testdir.tmpdir.join("plugin123.py").write(py.code.Source("""
|
||||
def pytest_namespace():
|
||||
return {'sample_variable': 'testing'}
|
||||
"""))
|
||||
testdir.makepyfile("""
|
||||
import pytest
|
||||
def test_hello():
|
||||
assert pytest.sample_variable == "testing"
|
||||
""")
|
||||
result = testdir.runpytest("-n1", "-p", "plugin123")
|
||||
assert result.ret == 0
|
||||
result.stdout.fnmatch_lines([
|
||||
"*1 passed*",
|
||||
])
|
||||
|
||||
@@ -62,7 +62,7 @@ def test_remoteinitconfig(testdir):
|
||||
config1 = testdir.parseconfig()
|
||||
config2 = remote_initconfig(config1.option.__dict__, config1.args)
|
||||
assert config2.option.__dict__ == config1.option.__dict__
|
||||
assert config2.pluginmanager.getplugin("terminal") == None
|
||||
assert config2.pluginmanager.getplugin("terminal") in (-1, None)
|
||||
|
||||
class TestReportSerialization:
|
||||
def test_itemreport_outcomes(self, testdir):
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#
|
||||
__version__ = '1.6.dev2'
|
||||
__version__ = '1.6.dev3'
|
||||
|
||||
@@ -120,9 +120,7 @@ def init_slave_session(channel, args, option_dict):
|
||||
|
||||
#fullwidth, hasmarkup = channel.receive()
|
||||
from _pytest.config import Config
|
||||
config = Config()
|
||||
config.option.__dict__.update(option_dict)
|
||||
config._preparse(list(args))
|
||||
config = Config.fromdictargs(option_dict, list(args))
|
||||
config.args = args
|
||||
from xdist.looponfail import SlaveFailSession
|
||||
SlaveFailSession(config, channel).main()
|
||||
|
||||
@@ -109,10 +109,8 @@ def getinfodict():
|
||||
|
||||
def remote_initconfig(option_dict, args):
|
||||
from _pytest.config import Config
|
||||
config = Config()
|
||||
config.pluginmanager.unregister(name="terminal")
|
||||
config._preparse(args, addopts=False)
|
||||
config.option.__dict__.update(option_dict)
|
||||
option_dict['plugins'].append("no:terminal")
|
||||
config = Config.fromdictargs(option_dict, args)
|
||||
config.option.looponfail = False
|
||||
config.option.usepdb = False
|
||||
config.option.dist = "no"
|
||||
|
||||
Reference in New Issue
Block a user