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

Function test_unknown_keys

tests/repository_test.py:201–215  ·  view source on GitHub ↗
(store, caplog)

Source from the content-addressed store, hash-verified

199
200
201def test_unknown_keys(store, caplog):
202 config = {
203 'repo': 'local',
204 'hooks': [{
205 'id': 'too-much',
206 'name': 'too much',
207 'hello': 'world',
208 'foo': 'bar',
209 'language': 'system',
210 'entry': 'true',
211 }],
212 }
213 _get_hook(config, store, 'too-much')
214 msg, = caplog.messages
215 assert msg == 'Unexpected key(s) present on local => too-much: foo, hello'
216
217
218def test_reinstall(tempdir_factory, store, caplog):

Callers

nothing calls this directly

Calls 1

_get_hookFunction · 0.85

Tested by

no test coverage detected