summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-30 06:53:55 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-30 06:53:55 (GMT)
commitc87c5800e749a724a101ce5fa267e4897c80e43b (patch)
tree0da8dfc28ed2b57ffb69a1dc17136c7a2d370031 /Lib
parenta48f3ab8951fa97844f2a4fa368483af968b7b73 (diff)
downloadcpython-c87c5800e749a724a101ce5fa267e4897c80e43b.zip
cpython-c87c5800e749a724a101ce5fa267e4897c80e43b.tar.gz
cpython-c87c5800e749a724a101ce5fa267e4897c80e43b.tar.bz2
Adapt test_ast to the new ExceptHandler type.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ast.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index e4f87f2..9dd27ea 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)])]),