mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Implement types filtering
This commit is contained in:
parent
a68c1ab0d2
commit
a58d99ac40
4 changed files with 36 additions and 0 deletions
|
|
@ -153,6 +153,19 @@ def test_hook_that_modifies_but_returns_zero(
|
|||
)
|
||||
|
||||
|
||||
def test_types_hook_repository(
|
||||
cap_out, tempdir_factory, mock_out_store_directory,
|
||||
):
|
||||
git_path = make_consuming_repo(tempdir_factory, 'types_repo')
|
||||
with cwd(git_path):
|
||||
stage_a_file('bar.py')
|
||||
stage_a_file('bar.notpy')
|
||||
ret, printed = _do_run(cap_out, git_path, _get_opts())
|
||||
assert ret == 1
|
||||
assert b'bar.py' in printed
|
||||
assert b'bar.notpy' not in printed
|
||||
|
||||
|
||||
def test_show_diff_on_failure(
|
||||
capfd, cap_out, tempdir_factory, mock_out_store_directory,
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue