mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
get rid of ast_error_finish by passing the compiling struct to ast_error
This commit is contained in:
parent
e9f72dbf0d
commit
bd0df50fb6
2 changed files with 74 additions and 118 deletions
|
@ -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")')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue