@@ -55,20 +55,22 @@ def test_create_symlink(monkeypatch: pytest.MonkeyPatch, tmp_path: Path):
55
55
assert not create_sym_link (tool_name , version , str (tmp_path ), True )
56
56
57
57
58
+ @pytest .mark .parametrize (
59
+ "tool_name" ,
60
+ ["clang-format" , "clang-tidy" , "clang-query" , "clang-apply-replacements" ],
61
+ )
58
62
@pytest .mark .parametrize ("version" , ["12" ])
59
- def test_install_tools (monkeypatch : pytest .MonkeyPatch , tmp_path : Path , version : str ):
63
+ def test_install_tools (
64
+ monkeypatch : pytest .MonkeyPatch , tmp_path : Path , tool_name : str , version : str
65
+ ):
60
66
"""Test install tools to a temp directory."""
61
67
monkeypatch .chdir (tmp_path )
62
- tool_name = "clang-format"
63
-
64
68
assert install_tool (tool_name , version , str (tmp_path ), False )
65
69
# invoking again should return False
66
70
assert not install_tool (tool_name , version , str (tmp_path ), False )
67
71
# uninstall the tool deliberately
68
72
uninstall_clang_tools (tool_name , version , str (tmp_path ))
69
- assert f"{ tool_name } -{ version } { suffix } " not in [
70
- fd .name for fd in tmp_path .iterdir ()
71
- ]
73
+ assert f"{ tool_name } -{ version } { suffix } " in [fd .name for fd in tmp_path .iterdir ()]
72
74
73
75
74
76
@pytest .mark .parametrize ("version" , ["0" ])
0 commit comments