mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Fix autoupdate spamming with defaults.
This commit is contained in:
parent
817ec510c7
commit
8b5c3b8745
4 changed files with 68 additions and 12 deletions
|
|
@ -120,6 +120,12 @@ def test_out_of_date_repo(out_of_date_repo):
|
|||
assert ret['sha'] == out_of_date_repo.head_sha
|
||||
|
||||
|
||||
def test_removes_defaults(out_of_date_repo):
|
||||
ret = _update_repository(out_of_date_repo.repo_config)
|
||||
assert 'args' not in ret['hooks'][0]
|
||||
assert 'expected_return_value' not in ret['hooks'][0]
|
||||
|
||||
|
||||
def test_autoupdate_out_of_date_repo(out_of_date_repo):
|
||||
before = open(C.CONFIG_FILE).read()
|
||||
runner = Runner(out_of_date_repo.python_hooks_repo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue