Skip to content

Commit

Permalink
test(conftest): support @pytest.mark.bashcomp(required_cmd=True)
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jun 20, 2021
1 parent 5e9c9a0 commit 53060e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ def bash(request) -> pexpect.spawn:
)
if match:
cmd = match.group(1)
if marker and marker.kwargs and marker.kwargs.get("require_cmd", False):
if not is_bash_type(bash, cmd):
pytest.skip("Command not found")

request.cls.cmd = cmd

Expand Down

0 comments on commit 53060e3

Please sign in to comment.