コード例 #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
ファイル: test_backends.py プロジェクト: alfredodeza/remoto
 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
ファイル: test_backends.py プロジェクト: alfredodeza/remoto
 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