Give a better message when ast is not parseable.

This commit is contained in:
Anthony Sottile 2014-06-19 17:41:53 -07:00
parent 766631472a
commit 830ea6d8c8
3 changed files with 17 additions and 3 deletions

View file

@ -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