MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_reinstall

Function test_reinstall

tests/repository_test.py:218–227  ·  view source on GitHub ↗
(tempdir_factory, store, caplog)

Source from the content-addressed store, hash-verified

216
217
218def test_reinstall(tempdir_factory, store, caplog):
219 path = make_repo(tempdir_factory, 'python_hooks_repo')
220 config = make_config_from_repo(path)
221 _get_hook(config, store, 'foo')
222 # We print some logging during clone (1) + install (3)
223 assert len(caplog.record_tuples) == 4
224 caplog.clear()
225 # Reinstall on another run should not trigger another install
226 _get_hook(config, store, 'foo')
227 assert len(caplog.record_tuples) == 0
228
229
230def test_control_c_control_c_on_install(tempdir_factory, store):

Callers

nothing calls this directly

Calls 3

make_repoFunction · 0.90
make_config_from_repoFunction · 0.90
_get_hookFunction · 0.85

Tested by

no test coverage detected