Fix a Python 2.7 issue

This commit is contained in:
Dave Halter
2020-01-06 00:02:26 +01:00
parent 9ee7409d8a
commit cfef1d74e7

View File

@@ -37,7 +37,8 @@ def test_python_exception_matches(code):
error, = errors
actual = error.message
assert actual in wanted
assert line_nr == error.start_pos[0]
# Somehow in Python2.7 the SyntaxError().lineno is sometimes None
assert line_nr is None or line_nr == error.start_pos[0]
def test_non_async_in_async():