mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
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
2 changed files with 2 additions and 1 deletions
1
news/7924.bugfix
Normal file
1
news/7924.bugfix
Normal file
|
@ -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):
|
def wrapper(fn):
|
||||||
try:
|
try:
|
||||||
subprocess.check_output(check_cmd)
|
subprocess.check_output(check_cmd)
|
||||||
except OSError:
|
except (OSError, subprocess.CalledProcessError):
|
||||||
return pytest.mark.skip(
|
return pytest.mark.skip(
|
||||||
reason='{name} is not available'.format(name=name))(fn)
|
reason='{name} is not available'.format(name=name))(fn)
|
||||||
return fn
|
return fn
|
||||||
|
|
Loading…
Reference in a new issue