mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 17:31:28 +08:00
Add some tests for tests_should_end_in_test hook
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
@ -11,14 +13,14 @@ def validate_files(argv):
|
||||
not filename.endswith('/conftest.py')
|
||||
):
|
||||
retcode = 1
|
||||
print '{0} does not end in _test.py'.format(filename)
|
||||
print('{0} does not end in _test.py'.format(filename))
|
||||
|
||||
return retcode
|
||||
|
||||
|
||||
def entry():
|
||||
validate_files(sys.argv[1:])
|
||||
return validate_files(sys.argv[1:])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(entry())
|
||||
sys.exit(entry())
|
||||
|
Reference in New Issue
Block a user