From: Georg Brandl Date: Sun, 30 Mar 2008 06:53:55 +0000 (+0000) Subject: Adapt test_ast to the new ExceptHandler type. X-Git-Tag: v2.6a2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c87c5800e749a724a101ce5fa267e4897c80e43b;p=python Adapt test_ast to the new ExceptHandler type. --- diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index e4f87f2c49..9dd27ea701 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -150,6 +150,7 @@ def run_tests(): (eval_tests, eval_results, "eval")): for i, o in itertools.izip(input, output): ast_tree = compile(i, "?", kind, 0x400) + print to_tuple(ast_tree), o assert to_tuple(ast_tree) == o test_order(ast_tree, (0, 0)) @@ -166,7 +167,7 @@ exec_results = [ ('Module', [('While', (1, 0), ('Name', (1, 6), 'v', ('Load',)), [('Pass', (1, 8))], [])]), ('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]), ('Module', [('Raise', (1, 0), ('Name', (1, 6), 'Exception', ('Load',)), ('Str', (1, 17), 'string'), None)]), -('Module', [('TryExcept', (1, 0), [('Pass', (2, 2))], [('excepthandler', (3, 0), ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))], 3, 0)], [])]), +('Module', [('TryExcept', (1, 0), [('Pass', (2, 2))], [('ExceptHandler', (3, 0), ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [])]), ('Module', [('TryFinally', (1, 0), [('Pass', (2, 2))], [('Pass', (4, 2))])]), ('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]), ('Module', [('Import', (1, 0), [('alias', 'sys', None)])]),