diff options
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | mako/_ast_util.py | 3 | ||||
| -rw-r--r-- | test/__init__.py | 2 | ||||
| -rw-r--r-- | test/test_ast.py | 1 |
4 files changed, 8 insertions, 1 deletions
@@ -14,6 +14,9 @@ avoiding TypeError when trying to produce partials. [ticket:207] +- [bug] Fixed Py3K bug where a "lambda" expression was not + interpreted correctly within a template tag. [ticket:190] + 0.8.1 - [bug] Changed setup.py to skip installing markupsafe if Python version is < 2.6 or is between 3.0 and diff --git a/mako/_ast_util.py b/mako/_ast_util.py index 0ae8f8a..cec767c 100644 --- a/mako/_ast_util.py +++ b/mako/_ast_util.py @@ -659,6 +659,9 @@ class SourceGenerator(NodeVisitor): def visit_Name(self, node): self.write(node.id) + def visit_arg(self, node): + self.write(node.arg) + def visit_Str(self, node): self.write(repr(node.s)) diff --git a/test/__init__.py b/test/__init__.py index a3cbaa2..623edcf 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -111,7 +111,7 @@ def requires_pygments_14(fn): version = pygments.__version__ except: version = "0" - return skip_if(lambda: version < "1.4")(fn) + return skip_if(lambda: version < "1.4", "Requires pygments 1.4 or greater")(fn) def requires_no_pygments_exceptions(fn): def go(*arg, **kw): diff --git a/test/test_ast.py b/test/test_ast.py index 84508c7..008bd55 100644 --- a/test/test_ast.py +++ b/test/test_ast.py @@ -316,6 +316,7 @@ 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(1 & 2 | 3)", "repr(3//5)", "repr(3^5)", |
