Apply typing to all of pre-commit-hooks

This commit is contained in:
Anthony Sottile 2019-01-31 19:19:10 -08:00
parent 63cc3414e9
commit 030bfac7e4
54 changed files with 401 additions and 264 deletions

View file

@ -1,6 +1,6 @@
import pytest
from pre_commit_hooks.check_json import check_json
from pre_commit_hooks.check_json import main
from testing.util import get_resource_path
@ -11,8 +11,8 @@ from testing.util import get_resource_path
('ok_json.json', 0),
),
)
def test_check_json(capsys, filename, expected_retval):
ret = check_json([get_resource_path(filename)])
def test_main(capsys, filename, expected_retval):
ret = main([get_resource_path(filename)])
assert ret == expected_retval
if expected_retval == 1:
stdout, _ = capsys.readouterr()