From 2efd4d9336761c34e3934bc29a1eb732ee31ee32 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 13 Jan 2010 17:25:13 +0100 Subject: [PATCH] small adaptations to py.impl move (should eventually not be neccessary to do such things) --- testing/test_dsession.py | 2 +- testing/test_gwmanage.py | 4 ++-- testing/test_pickling.py | 2 +- xdist/dsession.py | 4 ++-- xdist/plugin.py | 5 +++-- xdist/remote.py | 2 +- xdist/txnode.py | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/testing/test_dsession.py b/testing/test_dsession.py index 446b704..49d0082 100644 --- a/testing/test_dsession.py +++ b/testing/test_dsession.py @@ -1,5 +1,5 @@ from xdist.dsession import DSession -from py.impl.test import outcome +from py._test import outcome import py import execnet diff --git a/testing/test_gwmanage.py b/testing/test_gwmanage.py index 6510884..82ca5e8 100644 --- a/testing/test_gwmanage.py +++ b/testing/test_gwmanage.py @@ -1,8 +1,8 @@ import py import os from xdist.gwmanage import GatewayManager, HostRSync -from py.impl.test.pluginmanager import HookRelay, Registry -from py.plugin import hookspec +from py._test.pluginmanager import HookRelay, Registry +from py._plugin import hookspec import execnet def pytest_funcarg__hookrecorder(request): diff --git a/testing/test_pickling.py b/testing/test_pickling.py index 0feea5c..9bf49ec 100644 --- a/testing/test_pickling.py +++ b/testing/test_pickling.py @@ -66,7 +66,7 @@ class TestImmutablePickling: class TestConfigPickling: def test_config_getstate_setstate(self, testdir): - from py.impl.test.config import Config + from py._test.config import Config testdir.makepyfile(__init__="", conftest="x=1; y=2") hello = testdir.makepyfile(hello="") tmp = testdir.tmpdir diff --git a/xdist/dsession.py b/xdist/dsession.py index 8e910dc..5a24c77 100644 --- a/xdist/dsession.py +++ b/xdist/dsession.py @@ -1,6 +1,6 @@ import py -from py.impl.test.session import Session -from py.impl.test import outcome +from py._test.session import Session +from py._test import outcome from xdist.nodemanage import NodeManager queue = py.builtin._tryimport('queue', 'Queue') diff --git a/xdist/plugin.py b/xdist/plugin.py index 1b1dc59..73e71c9 100644 --- a/xdist/plugin.py +++ b/xdist/plugin.py @@ -20,6 +20,7 @@ program source code to the remote place. All test results are reported back and displayed to your local test session. You may specify different Python versions and interpreters. +.. _`pytest-xdist`: http://pytest.org/plugin/xdist.html Usage examples --------------------- @@ -202,7 +203,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 py.plugin.pytest_runner import runtestprotocol + from py._plugin.pytest_runner import runtestprotocol EXITSTATUS_TESTEXIT = 4 from xdist.mypickle import ImmutablePickler ipickle = ImmutablePickler(uneven=0) @@ -230,6 +231,6 @@ 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 py.plugin.pytest_runner import ItemTestReport + from py._plugin.pytest_runner import ItemTestReport return ItemTestReport(item, excinfo=info, when="???") diff --git a/xdist/remote.py b/xdist/remote.py index 1378dd3..d7fe3f8 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -10,7 +10,7 @@ import py import sys import execnet -from py.impl.test.session import Session +from py._test.session import Session from xdist import util class LooponfailingSession(Session): diff --git a/xdist/txnode.py b/xdist/txnode.py index a26b536..afc843f 100644 --- a/xdist/txnode.py +++ b/xdist/txnode.py @@ -3,7 +3,7 @@ """ import py from xdist.mypickle import PickleChannel -from py.impl.test import outcome +from py._test import outcome class TXNode(object): """ Represents a Test Execution environment in the controlling process.