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

Function test_install_idempotent

tests/commands/install_uninstall_test.py:237–245  ·  view source on GitHub ↗
(tempdir_factory, store)

Source from the content-addressed store, hash-verified

235
236
237def test_install_idempotent(tempdir_factory, store):
238 path = make_consuming_repo(tempdir_factory, 'script_hooks_repo')
239 with cwd(path):
240 assert install(C.CONFIG_FILE, store, hook_types=['pre-commit']) == 0
241 assert install(C.CONFIG_FILE, store, hook_types=['pre-commit']) == 0
242
243 ret, output = _get_commit_output(tempdir_factory)
244 assert ret == 0
245 NORMAL_PRE_COMMIT_RUN.assert_matches(output)
246
247
248def _path_without_us():

Callers

nothing calls this directly

Calls 4

make_consuming_repoFunction · 0.90
cwdFunction · 0.90
installFunction · 0.90
_get_commit_outputFunction · 0.85

Tested by

no test coverage detected