def _executable(self): """returns the virtualenv excutable""" if self.executable: return self.executable for binary in self.binaries: venv_exec = which(binary) if venv_exec: self.executable = venv_exec log.debug('virtualenv executable: {0}'.format(self.executable)) return self.executable return self.executable
def _set_python_path(self): """adds the full path to your python executable in common:python_path""" self.set('common', 'python_path', which('python'))
def test_does_not_exist(): assert which('not_existing') is None
def test_exists(): assert which('python') is not None