Commits

Mike Bayer committed 3188837

- changelog
- fix test to work under py3.2

Comments (0)

Files changed (3)

 0.9.1
+- [bug] Fixed TGPlugin.render method to support unicode template
+  names in Py2K - courtesy Vladimir Magamedov.
+
 - [bug] Fixed an AST issue that was preventing correct operation
   under alpha versions of Python 3.4.  Pullreq courtesy Zer0-.
 

mako/ext/turbogears.py

             elif k in ['directories', 'filesystem_checks', 'module_directory']:
                 lookup_options[k] = v
         self.lookup = TemplateLookup(**lookup_options)
- 
+
         self.tmpl_options = {}
         # transfer lookup args to template args, based on those available
         # in getargspec

test/test_tgplugin.py

-import unittest
-
 from mako.ext.turbogears import TGPlugin
-from test.util import flatten_result, result_lines
+from test.util import result_lines
 from test import TemplateTest, template_base
+from mako import compat
 
 tl = TGPlugin(options=dict(directories=[template_base]), extension='html')
 
         assert result_lines(tl.render({}, template='/index.html')) == [
             "this is index"
         ]
-        assert result_lines(tl.render({}, template=u'/index.html')) == [
+        assert result_lines(tl.render({}, template=compat.u('/index.html'))) == [
             "this is index"
         ]