diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-11 15:20:48 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-11-11 15:20:48 -0500 |
commit | 800f3b13ed9c1ea52fbd6544dc902ebd7a721733 (patch) | |
tree | 08e80e47a427c49f3b0540c3c6b4d35aee7e707f /test/test_decorators.py | |
parent | 3bbeaef7d5576fcefd1ccec3661ce7e3fd454094 (diff) | |
download | external_python_mako-800f3b13ed9c1ea52fbd6544dc902ebd7a721733.tar.gz external_python_mako-800f3b13ed9c1ea52fbd6544dc902ebd7a721733.tar.bz2 external_python_mako-800f3b13ed9c1ea52fbd6544dc902ebd7a721733.zip |
2.4-3.3 pass in place
Diffstat (limited to 'test/test_decorators.py')
-rw-r--r-- | test/test_decorators.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_decorators.py b/test/test_decorators.py index 74e674c..a3fa8f5 100644 --- a/test/test_decorators.py +++ b/test/test_decorators.py @@ -1,7 +1,7 @@ from mako.template import Template from mako import lookup import unittest -from .util import flatten_result, result_lines +from test.util import flatten_result, result_lines class DecoratorTest(unittest.TestCase): def test_toplevel(self): @@ -12,11 +12,11 @@ class DecoratorTest(unittest.TestCase): return "BAR" + runtime.capture(context, fn, *args, **kw) + "BAR" return decorate %> - + <%def name="foo(y, x)" decorator="bar"> this is foo ${y} ${x} </%def> - + ${foo(1, x=5)} """) @@ -56,7 +56,7 @@ class DecoratorTest(unittest.TestCase): %> <%def name="foo()"> - + <%def name="bar()" decorator="bat"> this is bar </%def> @@ -67,7 +67,7 @@ class DecoratorTest(unittest.TestCase): """) assert flatten_result(template.render()) == "BAT this is bar BAT" - + def test_toplevel_decorated_name(self): template = Template(""" <%! @@ -107,4 +107,4 @@ class DecoratorTest(unittest.TestCase): """) assert flatten_result(template.render()) == "function bar this is bar" - + |