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

Function test_gc_repo_not_cloned

tests/commands/gc_test.py:62–72  ·  view source on GitHub ↗
(tempdir_factory, store, in_git_dir, cap_out)

Source from the content-addressed store, hash-verified

60
61
62def test_gc_repo_not_cloned(tempdir_factory, store, in_git_dir, cap_out):
63 path = make_repo(tempdir_factory, 'script_hooks_repo')
64 write_config('.', make_config_from_repo(path))
65 store.mark_config_used(C.CONFIG_FILE)
66
67 assert _config_count(store) == 1
68 assert _repo_count(store) == 0
69 assert not gc(store)
70 assert _config_count(store) == 1
71 assert _repo_count(store) == 0
72 assert cap_out.get().splitlines()[-1] == '0 repo(s) removed.'
73
74
75def test_gc_meta_repo_does_not_crash(store, in_git_dir, cap_out):

Callers

nothing calls this directly

Calls 8

make_repoFunction · 0.90
write_configFunction · 0.90
make_config_from_repoFunction · 0.90
gcFunction · 0.90
_config_countFunction · 0.85
_repo_countFunction · 0.85
mark_config_usedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected