mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Some minor fixups
This commit is contained in:
parent
9db827ef9d
commit
5a8ca2ffbe
8 changed files with 79 additions and 50 deletions
|
|
@ -25,7 +25,7 @@ def test_hook_excludes_everything(
|
|||
add_config_to_repo(repo, config)
|
||||
|
||||
with cwd(repo):
|
||||
assert check_files_matches_any.main(argv=[]) == 1
|
||||
assert check_files_matches_any.main(()) == 1
|
||||
|
||||
out, _ = capsys.readouterr()
|
||||
assert 'check-useless-excludes does not apply to this repository' in out
|
||||
|
|
@ -50,7 +50,7 @@ def test_hook_includes_nothing(
|
|||
add_config_to_repo(repo, config)
|
||||
|
||||
with cwd(repo):
|
||||
assert check_files_matches_any.main(argv=[]) == 1
|
||||
assert check_files_matches_any.main(()) == 1
|
||||
|
||||
out, _ = capsys.readouterr()
|
||||
assert 'check-useless-excludes does not apply to this repository' in out
|
||||
|
|
@ -75,7 +75,7 @@ def test_hook_types_not_matched(
|
|||
add_config_to_repo(repo, config)
|
||||
|
||||
with cwd(repo):
|
||||
assert check_files_matches_any.main(argv=[]) == 1
|
||||
assert check_files_matches_any.main(()) == 1
|
||||
|
||||
out, _ = capsys.readouterr()
|
||||
assert 'check-useless-excludes does not apply to this repository' in out
|
||||
|
|
@ -100,7 +100,7 @@ def test_hook_types_excludes_everything(
|
|||
add_config_to_repo(repo, config)
|
||||
|
||||
with cwd(repo):
|
||||
assert check_files_matches_any.main(argv=[]) == 1
|
||||
assert check_files_matches_any.main(()) == 1
|
||||
|
||||
out, _ = capsys.readouterr()
|
||||
assert 'check-useless-excludes does not apply to this repository' in out
|
||||
|
|
@ -124,7 +124,7 @@ def test_valid_includes(
|
|||
add_config_to_repo(repo, config)
|
||||
|
||||
with cwd(repo):
|
||||
assert check_files_matches_any.main(argv=[]) == 0
|
||||
assert check_files_matches_any.main(()) == 0
|
||||
|
||||
out, _ = capsys.readouterr()
|
||||
assert out == ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue