From 79a9a99d1e6a21a2e747c4d1f72f9132ced52ea6 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 23 Nov 2009 17:25:46 +0100 Subject: [PATCH] small refinements/precision regarding execnet checks --HG-- branch : trunk --- py/impl/test/looponfail/remote.py | 2 +- py/plugin/pytest_default.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/py/impl/test/looponfail/remote.py b/py/impl/test/looponfail/remote.py index 712475b78..7df75b661 100644 --- a/py/impl/test/looponfail/remote.py +++ b/py/impl/test/looponfail/remote.py @@ -54,7 +54,7 @@ class RemoteControl(object): py.builtin.print_("RemoteControl:", msg) def initgateway(self): - return execnet.PopenGateway() + return execnet.makegateway("popen") def setup(self, out=None): if out is None: diff --git a/py/plugin/pytest_default.py b/py/plugin/pytest_default.py index ae5540d11..96ad78321 100644 --- a/py/plugin/pytest_default.py +++ b/py/plugin/pytest_default.py @@ -7,6 +7,9 @@ try: import execnet except ImportError: execnet = None +else: + if not hasattr(execnet, 'Group'): + execnet = None def pytest_pyfunc_call(__multicall__, pyfuncitem): if not __multicall__.execute(): @@ -70,7 +73,7 @@ def pytest_addoption(parser): add_dist_options(parser) else: parser.epilog = ( - "'execnet' package required for --looponfailing / distributed testing.") + "'execnet>=1.0.0b4' package required for --looponfailing / distributed testing.") def add_dist_options(parser): # see http://pytest.org/help/dist")