mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Some minor fixups
This commit is contained in:
parent
9db827ef9d
commit
5a8ca2ffbe
8 changed files with 79 additions and 50 deletions
|
|
@ -295,6 +295,24 @@ def test_autoupdate_local_hooks_with_out_of_date_repo(
|
|||
assert new_config_writen['repos'][0] == local_config
|
||||
|
||||
|
||||
def test_autoupdate_meta_hooks(tmpdir, capsys):
|
||||
cfg = tmpdir.join(C.CONFIG_FILE)
|
||||
cfg.write(
|
||||
'repos:\n'
|
||||
'- repo: meta\n'
|
||||
' hooks:\n'
|
||||
' - id: check-useless-excludes\n',
|
||||
)
|
||||
ret = autoupdate(Runner(tmpdir.strpath, C.CONFIG_FILE), tags_only=True)
|
||||
assert ret == 0
|
||||
assert cfg.read() == (
|
||||
'repos:\n'
|
||||
'- repo: meta\n'
|
||||
' hooks:\n'
|
||||
' - id: check-useless-excludes\n'
|
||||
)
|
||||
|
||||
|
||||
def test_updates_old_format_to_new_format(tmpdir, capsys):
|
||||
cfg = tmpdir.join(C.CONFIG_FILE)
|
||||
cfg.write(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue