summaryrefslogtreecommitdiffstats
path: root/tests/clientlib_test.py
diff options
context:
space:
mode:
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',
),
]