Merging upstream version 2.17.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
27828ee7f3
commit
66bc55f7a7
34 changed files with 336 additions and 116 deletions
|
@ -265,6 +265,11 @@ def test_warn_mutable_rev_conditional():
|
|||
r"pre-commit normalizes slashes in the 'files' field in hook "
|
||||
r"'flake8' to forward slashes, so you can use / instead of [/\\]",
|
||||
),
|
||||
(
|
||||
r'dir[\\/].*\.py',
|
||||
r"pre-commit normalizes slashes in the 'files' field in hook "
|
||||
r"'flake8' to forward slashes, so you can use / instead of [\\/]",
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_validate_optional_sensible_regex_at_hook(caplog, regex, warning):
|
||||
|
@ -295,6 +300,11 @@ def test_validate_optional_sensible_regex_at_hook(caplog, regex, warning):
|
|||
r"pre-commit normalizes the slashes in the top-level 'files' "
|
||||
r'field to forward slashes, so you can use / instead of [/\\]',
|
||||
),
|
||||
(
|
||||
r'dir[\\/].*\.py',
|
||||
r"pre-commit normalizes the slashes in the top-level 'files' "
|
||||
r'field to forward slashes, so you can use / instead of [\\/]',
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_validate_optional_sensible_regex_at_top_level(caplog, regex, warning):
|
||||
|
@ -413,6 +423,13 @@ def test_migrate_to_sha_ok():
|
|||
{'repo': 'meta', 'hooks': [{'id': 'identity', 'language': 'python'}]},
|
||||
# name override must be string
|
||||
{'repo': 'meta', 'hooks': [{'id': 'identity', 'name': False}]},
|
||||
pytest.param(
|
||||
{
|
||||
'repo': 'meta',
|
||||
'hooks': [{'id': 'identity', 'entry': 'echo hi'}],
|
||||
},
|
||||
id='cannot override entry for meta hooks',
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_meta_hook_invalid(config_repo):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue