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 30, 2021
1 parent 5e9c9a0 commit 01959d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/t/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,13 @@ 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 01959d2

Please sign in to comment.