diff --git a/ISSUES.txt b/ISSUES.txt index c05c7820..930bca08 100644 --- a/ISSUES.txt +++ b/ISSUES.txt @@ -2,12 +2,11 @@ rename / hooks ----------------------------------------------- tag: bug -node -> slave +node -> slave transition for hooks? configure_node -> configure_slave - -allow to run xdist tests with xdist +allow to remotely run xdist tests with xdist ----------------------------------------------- tag: feature @@ -16,3 +15,10 @@ currently this doesn't work because the remote side has no py.test plugin. How to configure/do register "xdist.plugin" on the remote side? +see to avoid any "from _pytest" internal imports +----------------------------------------------- +tag: feature + +currently tests and even xdist core code imports +names from the internal _pytest namespace. +See to avoid it. diff --git a/setup.py b/setup.py index 5d8a3541..cab11cb8 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name="pytest-xdist", - version='1.5a6', + version='1.5a7', description='py.test xdist plugin for distributed testing and loop-on-failing modes', long_description=__doc__, license='GPLv2 or later', diff --git a/testing/test_dsession.py b/testing/test_dsession.py index a1671d32..fbb2c4aa 100644 --- a/testing/test_dsession.py +++ b/testing/test_dsession.py @@ -1,5 +1,5 @@ from xdist.dsession import DSession, LoadScheduling, EachScheduling -from pytest.plugin import session as outcome +from _pytest import session as outcome import py import execnet @@ -140,7 +140,7 @@ class TestDistReporter: @py.test.mark.xfail def test_rsync_printing(self, testdir, linecomp): config = testdir.parseconfig() - from pytest.plugin.pytest_terminal import TerminalReporter + from _pytest.pytest_terminal import TerminalReporter rep = TerminalReporter(config, file=linecomp.stringio) config.pluginmanager.register(rep, "terminalreporter") dsession = DSession(config) diff --git a/testing/test_slavemanage.py b/testing/test_slavemanage.py index 7350a1a3..241e02fd 100644 --- a/testing/test_slavemanage.py +++ b/testing/test_slavemanage.py @@ -11,8 +11,8 @@ def pytest_funcarg__hookrecorder(request): def pytest_funcarg__hook(request): from xdist import newhooks - from pytest.main import HookRelay, PluginManager - from pytest import hookspec + from _pytest.core import HookRelay, PluginManager + from _pytest import hookspec return HookRelay([hookspec, newhooks], PluginManager()) class pytest_funcarg__mysetup: diff --git a/xdist/__init__.py b/xdist/__init__.py index 4a200769..ac59ec9b 100644 --- a/xdist/__init__.py +++ b/xdist/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '1.5a6' \ No newline at end of file +__version__ = '1.5a7' diff --git a/xdist/looponfail.py b/xdist/looponfail.py index ed574dea..c0499a6f 100644 --- a/xdist/looponfail.py +++ b/xdist/looponfail.py @@ -119,7 +119,7 @@ def init_slave_session(channel, args, option_dict): sys.path[:] = newpaths #fullwidth, hasmarkup = channel.receive() - from pytest.plugin.config import Config + from _pytest.config import Config config = Config() config.option.__dict__.update(option_dict) config._preparse(args) diff --git a/xdist/plugin.py b/xdist/plugin.py index 7ffcbf8d..f113ea22 100644 --- a/xdist/plugin.py +++ b/xdist/plugin.py @@ -236,7 +236,7 @@ def pytest_runtest_protocol(item): def forked_run_report(item): # for now, we run setup/teardown in the subprocess # XXX optionally allow sharing of setup/teardown - from pytest.plugin.runner import runtestprotocol + from _pytest.runner import runtestprotocol EXITSTATUS_TESTEXIT = 4 import marshal from xdist.remote import serialize_report @@ -262,7 +262,7 @@ def report_process_crash(item, result): path, lineno = item._getfslineno() info = "%s:%s: running the test CRASHED with signal %d" %( path, lineno, result.signal) - from pytest.plugin import runner + from _pytest import runner call = runner.CallInfo(lambda: 0/0, "???") call.excinfo = info rep = runner.pytest_runtest_makereport(item, call) diff --git a/xdist/remote.py b/xdist/remote.py index b28940f0..5154fdab 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -105,7 +105,7 @@ def getinfodict(): ) def remote_initconfig(option_dict, args): - from pytest.plugin.config import Config + from _pytest.config import Config config = Config() config.pluginmanager.unregister(name="terminal") config._preparse(args, addopts=False) diff --git a/xdist/slavemanage.py b/xdist/slavemanage.py index 4bc2a8d3..5703da15 100644 --- a/xdist/slavemanage.py +++ b/xdist/slavemanage.py @@ -3,7 +3,7 @@ import execnet import xdist.remote -from pytest.plugin import runner # XXX load dynamically +from _pytest import runner # XXX load dynamically class NodeManager(object): def __init__(self, config, specs=None):