Merge pull request #7930 from gutsytechster/strict_svn_check

fix(tests/lib): Catch `subprocess.CalledProcessError` in need_executable
This commit is contained in:
Jason R. Coombs 2020-03-29 12:54:20 -04:00 committed by GitHub
commit 019637cc67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
news/7924.bugfix Normal file
View File

@ -0,0 +1 @@
Catch ``subprocess.CalledProcessError`` when checking for the presence of executable within ``need_executable`` using pytest.

View File

@ -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