(tmp_path, tempdir_factory, store, in_git_dir)
| 145 | |
| 146 | |
| 147 | def test_during_commit_all(tmp_path, tempdir_factory, store, in_git_dir): |
| 148 | hook_dir = tmp_path.joinpath('hook') |
| 149 | hook_dir.mkdir() |
| 150 | _make_hello_world(hook_dir) |
| 151 | hook_dir.joinpath('.pre-commit-hooks.yaml').write_text( |
| 152 | '- id: hello-world\n' |
| 153 | ' name: hello world\n' |
| 154 | ' entry: golang-hello-world\n' |
| 155 | ' language: golang\n' |
| 156 | ' always_run: true\n', |
| 157 | ) |
| 158 | cmd_output('git', 'init', hook_dir) |
| 159 | cmd_output('git', 'add', '.', cwd=hook_dir) |
| 160 | git_commit(cwd=hook_dir) |
| 161 | |
| 162 | add_config_to_repo(in_git_dir, make_config_from_repo(hook_dir)) |
| 163 | |
| 164 | assert not install(C.CONFIG_FILE, store, hook_types=['pre-commit']) |
| 165 | |
| 166 | git_commit( |
| 167 | fn=cmd_output_mocked_pre_commit_home, |
| 168 | tempdir_factory=tempdir_factory, |
| 169 | ) |
| 170 | |
| 171 | |
| 172 | def test_automatic_toolchain_switching(tmp_path): |
nothing calls this directly
no test coverage detected