Commit bd0df50f authored by Benjamin Peterson's avatar Benjamin Peterson

get rid of ast_error_finish by passing the compiling struct to ast_error

parent e9f72dbf
......@@ -411,7 +411,9 @@ class ASTHelpers_Test(unittest.TestCase):
try:
1/0
except Exception:
self.assertRaises(SyntaxError, ast.parse, r"'\U'")
with self.assertRaises(SyntaxError) as e:
ast.literal_eval(r"'\U'")
self.assertIsNotNone(e.exception.__context__)
def test_dump(self):
node = ast.parse('spam(eggs, "and cheese")')
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment