88 get_version_from_dependency ,
99 _resolve_version ,
1010 _install_tool ,
11- _resolve_install ,
11+ resolve_install ,
1212 DEFAULT_CLANG_FORMAT_VERSION ,
1313 DEFAULT_CLANG_TIDY_VERSION ,
1414)
@@ -159,22 +159,22 @@ def test_install_tool_success_but_not_found():
159159 assert result is None
160160
161161
162- # Tests for _resolve_install
162+ # Tests for resolve_install
163163@pytest .mark .benchmark
164164def test_resolve_install_tool_already_installed_correct_version ():
165- """Test _resolve_install when tool is already installed with correct version."""
165+ """Test resolve_install when tool is already installed with correct version."""
166166 mock_path = "/usr/bin/clang-format"
167167
168168 with (
169169 patch ("shutil.which" , return_value = mock_path ),
170170 ):
171- result = _resolve_install ("clang-format" , "20.1.7" )
171+ result = resolve_install ("clang-format" , "20.1.7" )
172172 assert Path (result ) == Path (mock_path )
173173
174174
175175@pytest .mark .benchmark
176176def test_resolve_install_tool_version_mismatch ():
177- """Test _resolve_install when tool has wrong version."""
177+ """Test resolve_install when tool has wrong version."""
178178 mock_path = "/usr/bin/clang-format"
179179
180180 with (
@@ -183,39 +183,39 @@ def test_resolve_install_tool_version_mismatch():
183183 "cpp_linter_hooks.util._install_tool" , return_value = Path (mock_path )
184184 ) as mock_install ,
185185 ):
186- result = _resolve_install ("clang-format" , "20.1.7" )
186+ result = resolve_install ("clang-format" , "20.1.7" )
187187 assert result == Path (mock_path )
188188
189189 mock_install .assert_called_once_with ("clang-format" , "20.1.7" )
190190
191191
192192@pytest .mark .benchmark
193193def test_resolve_install_tool_not_installed ():
194- """Test _resolve_install when tool is not installed."""
194+ """Test resolve_install when tool is not installed."""
195195 with (
196196 patch ("shutil.which" , return_value = None ),
197197 patch (
198198 "cpp_linter_hooks.util._install_tool" ,
199199 return_value = Path ("/usr/bin/clang-format" ),
200200 ) as mock_install ,
201201 ):
202- result = _resolve_install ("clang-format" , "20.1.7" )
202+ result = resolve_install ("clang-format" , "20.1.7" )
203203 assert result == Path ("/usr/bin/clang-format" )
204204
205205 mock_install .assert_called_once_with ("clang-format" , "20.1.7" )
206206
207207
208208@pytest .mark .benchmark
209209def test_resolve_install_no_version_specified ():
210- """Test _resolve_install when no version is specified."""
210+ """Test resolve_install when no version is specified."""
211211 with (
212212 patch ("shutil.which" , return_value = None ),
213213 patch (
214214 "cpp_linter_hooks.util._install_tool" ,
215215 return_value = Path ("/usr/bin/clang-format" ),
216216 ) as mock_install ,
217217 ):
218- result = _resolve_install ("clang-format" , None )
218+ result = resolve_install ("clang-format" , None )
219219 assert result == Path ("/usr/bin/clang-format" )
220220
221221 mock_install .assert_called_once_with (
@@ -225,15 +225,15 @@ def test_resolve_install_no_version_specified():
225225
226226@pytest .mark .benchmark
227227def test_resolve_install_invalid_version ():
228- """Test _resolve_install with invalid version."""
228+ """Test resolve_install with invalid version."""
229229 with (
230230 patch ("shutil.which" , return_value = None ),
231231 patch (
232232 "cpp_linter_hooks.util._install_tool" ,
233233 return_value = Path ("/usr/bin/clang-format" ),
234234 ) as mock_install ,
235235 ):
236- result = _resolve_install ("clang-format" , "invalid.version" )
236+ result = resolve_install ("clang-format" , "invalid.version" )
237237 assert result == Path ("/usr/bin/clang-format" )
238238
239239 # Should fallback to default version
@@ -263,7 +263,7 @@ def test_version_lists_not_empty():
263263
264264@pytest .mark .benchmark
265265def test_resolve_install_with_none_default_version ():
266- """Test _resolve_install when DEFAULT versions are None."""
266+ """Test resolve_install when DEFAULT versions are None."""
267267 with (
268268 patch ("shutil.which" , return_value = None ),
269269 patch ("cpp_linter_hooks.util.DEFAULT_CLANG_FORMAT_VERSION" , None ),
@@ -273,7 +273,7 @@ def test_resolve_install_with_none_default_version():
273273 return_value = Path ("/usr/bin/clang-format" ),
274274 ) as mock_install ,
275275 ):
276- result = _resolve_install ("clang-format" , None )
276+ result = resolve_install ("clang-format" , None )
277277 assert result == Path ("/usr/bin/clang-format" )
278278
279279 # Should fallback to hardcoded version when DEFAULT is None
0 commit comments