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

Function test_post_checkout_hook

tests/commands/run_test.py:867–885  ·  view source on GitHub ↗
(cap_out, store, tempdir_factory)

Source from the content-addressed store, hash-verified

865
866
867def test_post_checkout_hook(cap_out, store, tempdir_factory):
868 path = git_dir(tempdir_factory)
869 config = {
870 'repo': 'meta', 'hooks': [
871 {'id': 'identity', 'stages': ['post-checkout']},
872 ],
873 }
874 add_config_to_repo(path, config)
875
876 with cwd(path):
877 _test_run(
878 cap_out,
879 store,
880 path,
881 {'hook_stage': 'post-checkout'},
882 expected_outputs=[b'identity...'],
883 expected_ret=0,
884 stage=False,
885 )
886
887
888def test_prepare_commit_msg_hook(cap_out, store, prepare_commit_msg_repo):

Callers

nothing calls this directly

Calls 4

git_dirFunction · 0.90
add_config_to_repoFunction · 0.90
cwdFunction · 0.90
_test_runFunction · 0.85

Tested by

no test coverage detected