Skip to content

Commit aefa713

Browse files
committed
fix: update tests
1 parent 40c74f1 commit aefa713

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/test_install.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,22 @@ def test_create_symlink(monkeypatch: pytest.MonkeyPatch, tmp_path: Path):
5555
assert not create_sym_link(tool_name, version, str(tmp_path), True)
5656

5757

58+
@pytest.mark.parametrize(
59+
"tool_name",
60+
["clang-format", "clang-tidy", "clang-query", "clang-apply-replacements"],
61+
)
5862
@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+
):
6066
"""Test install tools to a temp directory."""
6167
monkeypatch.chdir(tmp_path)
62-
tool_name = "clang-format"
63-
6468
assert install_tool(tool_name, version, str(tmp_path), False)
6569
# invoking again should return False
6670
assert not install_tool(tool_name, version, str(tmp_path), False)
6771
# uninstall the tool deliberately
6872
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()]
7274

7375

7476
@pytest.mark.parametrize("version", ["0"])

0 commit comments

Comments
 (0)