4
4
from cpp_linter_hooks .clang_format import run_clang_format
5
5
6
6
7
+ @pytest .mark .benchmark
7
8
@pytest .mark .parametrize (
8
9
("args" , "expected_retval" ),
9
10
(
@@ -24,6 +25,7 @@ def test_run_clang_format_valid(args, expected_retval, tmp_path):
24
25
assert test_file .read_text () == Path ("testing/good.c" ).read_text ()
25
26
26
27
28
+ @pytest .mark .benchmark
27
29
@pytest .mark .parametrize (
28
30
("args" , "expected_retval" ),
29
31
(
@@ -48,6 +50,7 @@ def test_run_clang_format_invalid(args, expected_retval, tmp_path):
48
50
assert ret == expected_retval
49
51
50
52
53
+ @pytest .mark .benchmark
51
54
@pytest .mark .parametrize (
52
55
("args" , "expected_retval" ),
53
56
(
@@ -66,6 +69,7 @@ def test_run_clang_format_dry_run(args, expected_retval, tmp_path):
66
69
assert ret == - 1 # Dry run should not fail
67
70
68
71
72
+ @pytest .mark .benchmark
69
73
def test_run_clang_format_verbose (tmp_path ):
70
74
"""Test that verbose option works and provides detailed output."""
71
75
# copy test file to tmp_path to prevent modifying repo data
@@ -82,6 +86,7 @@ def test_run_clang_format_verbose(tmp_path):
82
86
assert test_file .read_text () == Path ("testing/good.c" ).read_text ()
83
87
84
88
89
+ @pytest .mark .benchmark
85
90
def test_run_clang_format_verbose_error (tmp_path ):
86
91
"""Test that verbose option provides useful error information."""
87
92
test_file = tmp_path / "main.c"
0 commit comments