mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
Introduce .pre-commit-hooks.yaml as a replacement for hooks.yaml
This commit is contained in:
parent
b90a598fac
commit
b9e5184ebd
32 changed files with 107 additions and 21 deletions
|
|
@ -45,7 +45,7 @@ def _test_hook_repo(
|
|||
args,
|
||||
expected,
|
||||
expected_return_code=0,
|
||||
config_kwargs=None
|
||||
config_kwargs=None,
|
||||
):
|
||||
path = make_repo(tempdir_factory, repo_path)
|
||||
config = make_config_from_repo(path, **(config_kwargs or {}))
|
||||
|
|
@ -215,6 +215,15 @@ def test_system_hook_with_spaces(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_repo_with_legacy_hooks_yaml(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'legacy_hooks_yaml_repo',
|
||||
'system-hook-with-spaces', ['/dev/null'], b'Hello World\n',
|
||||
config_kwargs={'legacy': True},
|
||||
)
|
||||
|
||||
|
||||
@skipif_cant_run_swift
|
||||
@pytest.mark.integration
|
||||
def test_swift_hook(tempdir_factory, store):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue