MCPcopy
hub / github.com/pre-commit/pre-commit / test_config_overrides_repo_specifics

Function test_config_overrides_repo_specifics

tests/repository_test.py:305–314  ·  view source on GitHub ↗
(tempdir_factory, store)

Source from the content-addressed store, hash-verified

303
304
305def test_config_overrides_repo_specifics(tempdir_factory, store):
306 path = make_repo(tempdir_factory, 'script_hooks_repo')
307 config = make_config_from_repo(path)
308
309 hook = _get_hook(config, store, 'bash_hook')
310 assert hook.files == ''
311 # Set the file regex to something else
312 config['hooks'][0]['files'] = '\\.sh$'
313 hook = _get_hook(config, store, 'bash_hook')
314 assert hook.files == '\\.sh$'
315
316
317def _create_repo_with_tags(tempdir_factory, src, tag):

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