summaryrefslogtreecommitdiffstats
path: root/tests/clientlib_test.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-19 07:00:25 +0000
commita5907b904f568d3249b7629ea9ff3b932f723ce3 (patch)
treeb82c427c125ea5fcf9d1e2fb48e4a529fc932fba /tests/clientlib_test.py
parentAdding upstream version 2.18.1. (diff)
downloadpre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.tar.xz
pre-commit-a5907b904f568d3249b7629ea9ff3b932f723ce3.zip
Adding upstream version 2.19.0.upstream/2.19.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/clientlib_test.py')
-rw-r--r--tests/clientlib_test.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/clientlib_test.py b/tests/clientlib_test.py
index 3fb3af5..fb36bb5 100644
--- a/tests/clientlib_test.py
+++ b/tests/clientlib_test.py
@@ -122,8 +122,8 @@ def test_validate_config_old_list_format_ok(tmpdir, cap_out):
f = tmpdir.join('cfg.yaml')
f.write('- {repo: meta, hooks: [{id: identity}]}')
assert not validate_config_main((f.strpath,))
- start = '[WARNING] normalizing pre-commit configuration to a top-level map'
- assert cap_out.get().startswith(start)
+ msg = '[WARNING] normalizing pre-commit configuration to a top-level map'
+ assert msg in cap_out.get()
def test_validate_warn_on_unknown_keys_at_repo_level(tmpdir, caplog):
@@ -142,6 +142,12 @@ def test_validate_warn_on_unknown_keys_at_repo_level(tmpdir, caplog):
(
'pre_commit',
logging.WARNING,
+ 'pre-commit-validate-config is deprecated -- '
+ 'use `pre-commit validate-config` instead.',
+ ),
+ (
+ 'pre_commit',
+ logging.WARNING,
'Unexpected key(s) present on https://gitlab.com/pycqa/flake8: '
'args',
),
@@ -165,6 +171,12 @@ def test_validate_warn_on_unknown_keys_at_top_level(tmpdir, caplog):
(
'pre_commit',
logging.WARNING,
+ 'pre-commit-validate-config is deprecated -- '
+ 'use `pre-commit validate-config` instead.',
+ ),
+ (
+ 'pre_commit',
+ logging.WARNING,
'Unexpected key(s) present at root: foo',
),
]