Best Python code snippet using tox_python
venv.py
Source:venv.py
...163 path = cwd.join(name)164 if path.check():165 return str(path)166 if venv:167 path = self._venv_lookup_and_check_external_allowlist(name)168 else:169 path = self._normal_lookup(name)170 if path is None:171 raise tox.exception.InvocationError(172 "could not find executable {}".format(pipes.quote(name)),173 )174 return str(path) # will not be rewritten for reporting175 def _venv_lookup_and_check_external_allowlist(self, name):176 path = self._venv_lookup(name)177 if path is None:178 path = self._normal_lookup(name)179 if path is not None:180 self._check_external_allowed_and_warn(path)181 return path182 def _venv_lookup(self, name):183 return py.path.local.sysfind(name, paths=[self.envconfig.envbindir])184 def _normal_lookup(self, name):185 return py.path.local.sysfind(name)186 def _check_external_allowed_and_warn(self, path):187 if not self.is_allowed_external(path):188 reporter.warning(189 "test command found but not installed in testenv\n"...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!