diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-30 11:22:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-08-30 11:22:53 +0000 |
commit | 6cfa8e0963e9a518a25528a248932fcf41b4f969 (patch) | |
tree | 6882a2a7a3214ef85d7a946f2506e9ed2c3f60f5 /tests/clientlib_test.py | |
parent | Adding upstream version 2.6.0. (diff) | |
download | pre-commit-6cfa8e0963e9a518a25528a248932fcf41b4f969.tar.xz pre-commit-6cfa8e0963e9a518a25528a248932fcf41b4f969.zip |
Adding upstream version 2.7.1.upstream/2.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/clientlib_test.py')
-rw-r--r-- | tests/clientlib_test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/clientlib_test.py b/tests/clientlib_test.py index c48adbd..2e2f738 100644 --- a/tests/clientlib_test.py +++ b/tests/clientlib_test.py @@ -30,6 +30,10 @@ def test_check_type_tag_failures(value): check_type_tag(value) +def test_check_type_tag_success(): + check_type_tag('file') + + @pytest.mark.parametrize( ('config_obj', 'expected'), ( ( @@ -110,15 +114,18 @@ def test_validate_config_main_ok(): assert not validate_config_main(('.pre-commit-config.yaml',)) -def test_validate_config_old_list_format_ok(tmpdir): +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) def test_validate_warn_on_unknown_keys_at_repo_level(tmpdir, caplog): f = tmpdir.join('cfg.yaml') f.write( + 'repos:\n' '- repo: https://gitlab.com/pycqa/flake8\n' ' rev: 3.7.7\n' ' hooks:\n' |