aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ast.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-08-04 00:04:07 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-08-04 00:04:07 -0400
commit10ca8d3a5b4e7b20a7b9be34c832ab1edb9bb6d7 (patch)
treeba01429aecc910841d6dfa1b67f75046cd2e8346 /test/test_ast.py
parent82d4954148bd3459a2f6fe0fdacc9118b649d316 (diff)
downloadexternal_python_mako-10ca8d3a5b4e7b20a7b9be34c832ab1edb9bb6d7.tar.gz
external_python_mako-10ca8d3a5b4e7b20a7b9be34c832ab1edb9bb6d7.tar.bz2
external_python_mako-10ca8d3a5b4e7b20a7b9be34c832ab1edb9bb6d7.zip
- fix #190 for py2.4rel_0_9_0
- other 2.4 ism
Diffstat (limited to 'test/test_ast.py')
-rw-r--r--test/test_ast.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_ast.py b/test/test_ast.py
index 008bd55..be93751 100644
--- a/test/test_ast.py
+++ b/test/test_ast.py
@@ -316,7 +316,8 @@ import x as bar
"repr({'x':-1})", "repr(((1,2,3), (4,5,6)))",
"repr(1 and 2 and 3 and 4)",
"repr(True and False or 55)",
- "repr(lambda x, y: x+y)",
+ "repr(lambda x, y: (x + y))",
+ "repr(lambda *arg, **kw: arg, kw)",
"repr(1 & 2 | 3)",
"repr(3//5)",
"repr(3^5)",
@@ -327,9 +328,12 @@ import x as bar
local_dict = {}
astnode = pyparser.parse(code)
newcode = pyparser.ExpressionGenerator(astnode).value()
- eq_(eval(code, local_dict),
- eval(newcode, local_dict)
- )
+ if "lambda" in code:
+ eq_(code, newcode)
+ else:
+ eq_(eval(code, local_dict),
+ eval(newcode, local_dict)
+ )