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

Function test_default_language_version

tests/repository_test.py:361–375  ·  view source on GitHub ↗
(store, local_python_config)

Source from the content-addressed store, hash-verified

359
360
361def test_default_language_version(store, local_python_config):
362 config: dict[str, Any] = {
363 'default_language_version': {'python': 'fake'},
364 'default_stages': ['pre-commit'],
365 'repos': [local_python_config],
366 }
367
368 # `language_version` was not set, should default
369 hook, = all_hooks(config, store)
370 assert hook.language_version == 'fake'
371
372 # `language_version` is set, should not default
373 config['repos'][0]['hooks'][0]['language_version'] = 'fake2'
374 hook, = all_hooks(config, store)
375 assert hook.language_version == 'fake2'
376
377
378def test_default_stages(store, local_python_config):

Callers

nothing calls this directly

Calls 1

all_hooksFunction · 0.90

Tested by

no test coverage detected