summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-10-08 19:31:15 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-10-08 19:31:15 -0400
commit31888375ee0997fe74fc78702d04cc480e82415d (patch)
tree4d1bb7831f8b3789d21c4fdb03a38641116b01f4
parent99d3272ba4d84d2b6dcc0bd46a48553f83787755 (diff)
downloadmako-31888375ee0997fe74fc78702d04cc480e82415d.tar.gz
- changelog
- fix test to work under py3.2
-rw-r--r--CHANGES3
-rw-r--r--mako/ext/turbogears.py2
-rw-r--r--test/test_tgplugin.py7
3 files changed, 7 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index df6a486..eb30e38 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,7 @@
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-.
diff --git a/mako/ext/turbogears.py b/mako/ext/turbogears.py
index a1e3ab8..a4179d0 100644
--- a/mako/ext/turbogears.py
+++ b/mako/ext/turbogears.py
@@ -26,7 +26,7 @@ class TGPlugin(object):
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
diff --git a/test/test_tgplugin.py b/test/test_tgplugin.py
index 9564c43..3f548c4 100644
--- a/test/test_tgplugin.py
+++ b/test/test_tgplugin.py
@@ -1,8 +1,7 @@
-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')
@@ -45,6 +44,6 @@ class TestTGPlugin(TemplateTest):
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"
]