예제 #1
0
 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'
예제 #2
0
 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'
예제 #3
0
 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
예제 #4
0
 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