adapt to new import locations
This commit is contained in:
12
ISSUES.txt
12
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.
|
||||
|
||||
2
setup.py
2
setup.py
@@ -10,7 +10,7 @@ from setuptools import setup
|
||||
|
||||
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',
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#
|
||||
__version__ = '1.5a6'
|
||||
__version__ = '1.5a7'
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -3,7 +3,7 @@ import sys, os
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user