(tempdir_factory, store)
| 431 | |
| 432 | |
| 433 | def test_install_overwrite(tempdir_factory, store): |
| 434 | path = make_consuming_repo(tempdir_factory, 'script_hooks_repo') |
| 435 | with cwd(path): |
| 436 | _write_legacy_hook(path) |
| 437 | assert not install( |
| 438 | C.CONFIG_FILE, store, hook_types=['pre-commit'], overwrite=True, |
| 439 | ) |
| 440 | |
| 441 | ret, output = _get_commit_output(tempdir_factory) |
| 442 | assert ret == 0 |
| 443 | NORMAL_PRE_COMMIT_RUN.assert_matches(output) |
| 444 | |
| 445 | |
| 446 | def test_uninstall_restores_legacy_hooks(tempdir_factory, store): |
nothing calls this directly
no test coverage detected