commit | bd0df50fb6fd54efee84707e9e372b5e9133ce03 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Sun Sep 02 15:04:51 2012 -0400 |
committer | Benjamin Peterson <benjamin@python.org> | Sun Sep 02 15:04:51 2012 -0400 |
tree | b93b8d2f41c0c2da29bfc0993e3957dfa5ae1145 | |
parent | e9f72dbf0d857d166626f7fc2713c07a67db1643 [diff] [blame] |
get rid of ast_error_finish by passing the compiling struct to ast_error
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 413613f..a8853c7 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py
@@ -411,7 +411,9 @@ 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")')