Skip to content

Commit 4dcaef1

Browse files
committed
add @pytest.mark.benchmark to test
1 parent d1ee4f5 commit 4dcaef1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from cpp_linter_hooks.util import ensure_installed, is_installed
77

88

9-
VERSIONS = [None, "18"]
9+
VERSIONS = [None, "20"]
1010
TOOLS = ["clang-format", "clang-tidy"]
1111

1212

@@ -37,6 +37,7 @@ def test_ensure_installed(tool, version, tmp_path, monkeypatch, caplog):
3737
assert any("Ensuring" in record.message for record in caplog.records)
3838

3939

40+
@pytest.mark.benchmark
4041
def test_is_installed_with_shutil_which(tmp_path):
4142
"""Test is_installed when tool is found via shutil.which."""
4243
tool_path = tmp_path / "clang-format"
@@ -47,6 +48,7 @@ def test_is_installed_with_shutil_which(tmp_path):
4748
assert result == tool_path
4849

4950

51+
@pytest.mark.benchmark
5052
def test_is_installed_not_found():
5153
"""Test is_installed when tool is not found anywhere."""
5254
with (
@@ -57,6 +59,7 @@ def test_is_installed_not_found():
5759
assert result is None
5860

5961

62+
@pytest.mark.benchmark
6063
def test_ensure_installed_tool_not_found(caplog):
6164
"""Test ensure_installed when tool is not found."""
6265
with (

0 commit comments

Comments
 (0)