summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-03-19 17:56:01 (GMT)
committerGuido van Rossum <guido@python.org>2007-03-19 17:56:01 (GMT)
commitd16e81aabe5448a90640694d57cdaefddf3a1a9f (patch)
tree1d422ec1ee0944f60ceedd91f69af4034cb170e6 /Lib/test/test_ast.py
parent801dd736531f7d6db57a1dab80fe6daa37e0a0b0 (diff)
downloadcpython-d16e81aabe5448a90640694d57cdaefddf3a1a9f.zip
cpython-d16e81aabe5448a90640694d57cdaefddf3a1a9f.tar.gz
cpython-d16e81aabe5448a90640694d57cdaefddf3a1a9f.tar.bz2
Fix the compiler package w.r.t. the new metaclass syntax.
(It is still broken w.r.t. the new nonlocal keyword.) Remove a series of debug prints I accidentally left in test_ast.py.
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index c702ab1..308ddae 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -144,13 +144,9 @@ def run_tests():
(eval_tests, eval_results, "eval")):
for i, o in itertools.izip(input, output):
ast_tree = compile(i, "?", kind, 0x400)
- if to_tuple(ast_tree) != o:
- print("i=", i)
- print("o=", o)
- print("kind=", kind)
- print("tree=", ast_tree)
- print("tuple=", to_tuple(ast_tree))
- assert to_tuple(ast_tree) == o
+ tup = to_tuple(ast_tree)
+ assert tup == o, ("kind=%r\ninput=%r\nexpected=%r\ngot=%r" %
+ (kind, i, o, tup))
test_order(ast_tree, (0, 0))
#### EVERYTHING BELOW IS GENERATED #####