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

Function test_unsupported_language_migration

tests/clientlib_test.py:385–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

383
384
385def test_unsupported_language_migration():
386 cfg = {'repos': [sample_local_config(), sample_local_config()]}
387 cfg['repos'][0]['hooks'][0]['language'] = 'system'
388 cfg['repos'][1]['hooks'][0]['language'] = 'script'
389
390 cfgv.validate(cfg, CONFIG_SCHEMA)
391 ret = cfgv.apply_defaults(cfg, CONFIG_SCHEMA)
392
393 assert ret['repos'][0]['hooks'][0]['language'] == 'unsupported'
394 assert ret['repos'][1]['hooks'][0]['language'] == 'unsupported_script'
395
396
397def test_unsupported_language_migration_language_required():

Callers

nothing calls this directly

Calls 1

sample_local_configFunction · 0.90

Tested by

no test coverage detected