mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
skip installation for SKIP'd hooks
This commit is contained in:
parent
a1b462c94a
commit
12a7075fda
2 changed files with 28 additions and 3 deletions
|
|
@ -600,6 +600,29 @@ def test_skip_aliased_hook(cap_out, store, aliased_repo):
|
|||
assert printed.count(msg) == 1
|
||||
|
||||
|
||||
def test_skip_bypasses_installation(cap_out, store, repo_with_passing_hook):
|
||||
config = {
|
||||
'repo': 'local',
|
||||
'hooks': [
|
||||
{
|
||||
'id': 'skipme',
|
||||
'name': 'skipme',
|
||||
'entry': 'skipme',
|
||||
'language': 'python',
|
||||
'additional_dependencies': ['/pre-commit-does-not-exist'],
|
||||
},
|
||||
],
|
||||
}
|
||||
add_config_to_repo(repo_with_passing_hook, config)
|
||||
|
||||
ret, printed = _do_run(
|
||||
cap_out, store, repo_with_passing_hook,
|
||||
run_opts(all_files=True),
|
||||
{'SKIP': 'skipme'},
|
||||
)
|
||||
assert ret == 0
|
||||
|
||||
|
||||
def test_hook_id_not_in_non_verbose_output(
|
||||
cap_out, store, repo_with_passing_hook,
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue