mirror of https://github.com/pypa/pip
Merge pull request #7930 from gutsytechster/strict_svn_check
fix(tests/lib): Catch `subprocess.CalledProcessError` in need_executable
This commit is contained in:
commit
019637cc67
|
@ -0,0 +1 @@
|
|||
Catch ``subprocess.CalledProcessError`` when checking for the presence of executable within ``need_executable`` using pytest.
|
|
@ -1079,7 +1079,7 @@ def need_executable(name, check_cmd):
|
|||
def wrapper(fn):
|
||||
try:
|
||||
subprocess.check_output(check_cmd)
|
||||
except OSError:
|
||||
except (OSError, subprocess.CalledProcessError):
|
||||
return pytest.mark.skip(
|
||||
reason='{name} is not available'.format(name=name))(fn)
|
||||
return fn
|
||||
|
|
Loading…
Reference in New Issue