Skip to content

Commit

Permalink
Merge pull request #7930 from gutsytechster/strict_svn_check
Browse files Browse the repository at this point in the history
fix(tests/lib): Catch `subprocess.CalledProcessError` in need_executable
  • Loading branch information
jaraco authored Mar 29, 2020
2 parents 03f0ff4 + 315447d commit 019637c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/7924.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Catch ``subprocess.CalledProcessError`` when checking for the presence of executable within ``need_executable`` using pytest.
2 changes: 1 addition & 1 deletion tests/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 019637c

Please sign in to comment.