mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 21:04:17 +00:00
Update project setup.
This commit is contained in:
parent
13b4ca54cf
commit
b80ca9e84a
23 changed files with 186 additions and 112 deletions
|
|
@ -1,14 +1,11 @@
|
|||
|
||||
from pre_commit_hooks.tests_should_end_in_test import validate_files
|
||||
|
||||
|
||||
def test_validate_files_all_pass(print_mock):
|
||||
def test_validate_files_all_pass():
|
||||
ret = validate_files(['foo_test.py', 'bar_test.py'])
|
||||
assert ret == 0
|
||||
assert print_mock.call_count == 0
|
||||
|
||||
|
||||
def test_validate_files_one_fails(print_mock):
|
||||
def test_validate_files_one_fails():
|
||||
ret = validate_files(['not_test_ending.py', 'foo_test.py'])
|
||||
assert ret == 1
|
||||
assert print_mock.call_count == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue