How to use the execnet.PopenGateway function in execnet

To help you get started, we’ve selected a few execnet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pytest-dev / execnet / testing / test_gateway.py View on Github external
def test_deprecation(recwarn, monkeypatch):
    execnet.PopenGateway().exit()
    assert recwarn.pop(DeprecationWarning)
    monkeypatch.setattr(socket, "socket", fails)
    py.test.raises(Exception, execnet.SocketGateway, "localhost", 8811)
    assert recwarn.pop(DeprecationWarning)
    monkeypatch.setattr(subprocess, "Popen", fails)
    py.test.raises(Exception, execnet.SshGateway, "not-existing")
    assert recwarn.pop(DeprecationWarning)
github pytest-dev / execnet / testing / test_gateway.py View on Github external
def test_deprecation(recwarn, monkeypatch):
    execnet.PopenGateway().exit()
    assert recwarn.pop(DeprecationWarning)
    monkeypatch.setattr(py.std.socket, 'socket', lambda *args: 0/0)
    py.test.raises(Exception, 'execnet.SocketGateway("localhost", 8811)')
    assert recwarn.pop(DeprecationWarning)
    monkeypatch.setattr(py.std.subprocess, 'Popen', lambda *args,**kwargs: 0/0)
    py.test.raises(Exception, 'execnet.SshGateway("not-existing")')
    assert recwarn.pop(DeprecationWarning)
github pytest-dev / pytest / testing / pytest / dist / test_mypickle.py View on Github external
def setup_class(cls):
        cls.gw = execnet.PopenGateway()
        cls.gw.remote_exec(
            "import py ; py.path.local(%r).pyimport()" %(__file__)
        )
        cls.gw.remote_init_threads(5)
        # we need the remote test code to import 
github pytest-dev / pytest-xdist / testing / test_mypickle.py View on Github external
def setup_class(cls):
        cls.gw = execnet.PopenGateway()
        cls.gw.remote_exec(
            "import py ; py.path.local(%r).pyimport()" %(__file__)
        )
        cls.gw.remote_init_threads(5)
        # we need the remote test code to import