Skip to content

Commit 71592a8

Browse files
committed
test(man): fix inactive "required_cmd"
Fixes the test failure of `test_10' (test_man.py). The decorator `@pytest.mark.complete(require_cmd=True)' is referenced only when the fixture `completion' is requested. Since `completion' was not requested by `test_10', `require_cmd=True' was ignored. Now `test_10' checks the command (non-)existence on its own for test skipping.
1 parent 7e0803f commit 71592a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/t/test_man.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
assert_bash_exec,
55
assert_complete,
66
bash_env_saved,
7+
is_bash_type,
78
prepare_fixture_dir,
89
)
910

@@ -105,8 +106,9 @@ def test_8(self, completion):
105106
def test_9(self, bash, completion):
106107
assert self.assumed_present in completion
107108

108-
@pytest.mark.complete(require_cmd=True)
109109
def test_10(self, request, bash, colonpath):
110+
if not is_bash_type(bash, "man"):
111+
pytest.skip("Command not found")
110112
with bash_env_saved(bash) as bash_env:
111113
bash_env.write_env(
112114
"MANPATH",

0 commit comments

Comments
 (0)