From 00f5354c65dff6a40cda6b5a2c633f9e92eca1e1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 19 Jun 2022 09:00:31 +0200 Subject: Merging upstream version 2.19.0. Signed-off-by: Daniel Baumann --- tests/clientlib_test.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tests/clientlib_test.py') 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): @@ -139,6 +139,12 @@ def test_validate_warn_on_unknown_keys_at_repo_level(tmpdir, caplog): ret_val = validate_config_main((f.strpath,)) assert not ret_val assert caplog.record_tuples == [ + ( + 'pre_commit', + logging.WARNING, + 'pre-commit-validate-config is deprecated -- ' + 'use `pre-commit validate-config` instead.', + ), ( 'pre_commit', logging.WARNING, @@ -162,6 +168,12 @@ def test_validate_warn_on_unknown_keys_at_top_level(tmpdir, caplog): ret_val = validate_config_main((f.strpath,)) assert not ret_val assert caplog.record_tuples == [ + ( + 'pre_commit', + logging.WARNING, + 'pre-commit-validate-config is deprecated -- ' + 'use `pre-commit validate-config` instead.', + ), ( 'pre_commit', logging.WARNING, -- cgit v1.2.3