def test_which(self, monkeypatch): monkeypatch.setattr(backends, 'check', lambda *a, **kw: (['/usr/bin/python17'], [], 0)) conn = local.LocalConnection() result = backends.get_python_executable(conn) assert result == '/usr/bin/python17'
def test_which(self, monkeypatch): monkeypatch.setattr(backends, 'check', lambda *a, **kw: (['/usr/bin/python17'], [], 0)) conn = local.LocalConnection() result = backends.get_python_executable(conn) assert result == '/usr/bin/python17'
def test_no_stdout(self, monkeypatch): monkeypatch.setattr(backends, 'check', lambda *a, **kw: ([], [], 0)) conn = local.LocalConnection() result = backends.get_python_executable(conn) assert result == conn.interpreter
def test_no_stdout(self, monkeypatch): monkeypatch.setattr(backends, 'check', lambda *a, **kw: ([], [], 0)) conn = local.LocalConnection() result = backends.get_python_executable(conn) assert result == conn.interpreter