aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_exceptions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:02:31 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:02:31 -0500
commitf298b36d4e940b1f9e737a64bbd06182da9794fa (patch)
tree97aa9dda9aa89eb7ac6d30dd9578e05da0fcc22f /test/test_exceptions.py
parent1eb56ef02a7fa825be99ddfb95f217a07dab1cdf (diff)
downloadexternal_python_mako-f298b36d4e940b1f9e737a64bbd06182da9794fa.tar.gz
external_python_mako-f298b36d4e940b1f9e737a64bbd06182da9794fa.tar.bz2
external_python_mako-f298b36d4e940b1f9e737a64bbd06182da9794fa.zip
all tests pass on py3k and py2.7. py2.5/2.4 next
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r--test/test_exceptions.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py
index d7feb9a..e860a4c 100644
--- a/test/test_exceptions.py
+++ b/test/test_exceptions.py
@@ -9,7 +9,7 @@ from test.util import result_lines
from test import TemplateTest
from test import requires_pygments_14, requires_no_pygments, \
requires_python_25_or_greater
-
+from mako.compat import u
class ExceptionsTest(TemplateTest):
def test_html_error_template(self):
@@ -159,16 +159,16 @@ ${u'привет'}
@requires_python_25_or_greater
def test_py_utf8_html_error_template(self):
try:
- foo = '日本'
+ foo = u('日本')
raise RuntimeError('test')
except:
html_error = exceptions.html_error_template().render()
if compat.py3k:
assert 'RuntimeError: test' in html_error.decode('utf-8')
- assert "foo = &#39;日本&#39;" in html_error.decode('utf-8')
+ assert "foo = u(&#39;日本&#39;)" in html_error.decode('utf-8')
else:
assert 'RuntimeError: test' in html_error
- assert "foo = u&#39;&#x65E5;&#x672C;&#39;" in html_error
+ assert "foo = u(&#39;&#x65E5;&#x672C;&#39;)" in html_error
def test_py_unicode_error_html_error_template(self):
try: