mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Give a better message when ast is not parseable.
This commit is contained in:
parent
766631472a
commit
830ea6d8c8
3 changed files with 17 additions and 3 deletions
|
|
@ -65,3 +65,8 @@ def test_returns_one_for_failing_file():
|
|||
def test_returns_zero_for_passing_file():
|
||||
ret = debug_statement_hook([__file__])
|
||||
assert ret == 0
|
||||
|
||||
|
||||
def test_syntaxerror_file():
|
||||
ret = debug_statement_hook([get_resource_path('cannot_parse_ast.notpy')])
|
||||
assert ret == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue