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

Function test_repository_state_compatibility

tests/repository_test.py:187–198  ·  view source on GitHub ↗
(tempdir_factory, store, v)

Source from the content-addressed store, hash-verified

185
186@pytest.mark.parametrize('v', ('v1', 'v2'))
187def test_repository_state_compatibility(tempdir_factory, store, v):
188 path = make_repo(tempdir_factory, 'python_hooks_repo')
189
190 config = make_config_from_repo(path)
191 hook = _get_hook(config, store, 'foo')
192 envdir = lang_base.environment_dir(
193 hook.prefix,
194 python.ENVIRONMENT_DIR,
195 hook.language_version,
196 )
197 os.remove(os.path.join(envdir, f'.install_state_{v}'))
198 assert _hook_installed(hook) is True
199
200
201def test_unknown_keys(store, caplog):

Callers

nothing calls this directly

Calls 4

make_repoFunction · 0.90
make_config_from_repoFunction · 0.90
_hook_installedFunction · 0.90
_get_hookFunction · 0.85

Tested by

no test coverage detected