Skip type hinting tests if there is a SyntaxError while importing a module with function annotations

This commit is contained in:
Andrey Vlasovskikh 2015-07-31 21:56:13 +03:00
parent 1224256341
commit ef0d4e7946

View File

@ -976,7 +976,7 @@ def test_type_hints():
try: try:
from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8 from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8
except ImportError: except (ImportError, SyntaxError):
raise SkipTest('Cannot import Python code with function annotations') raise SkipTest('Cannot import Python code with function annotations')
def verify_arg_spec(f, expected): def verify_arg_spec(f, expected):