aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_exceptions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-02 11:47:11 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-02 11:47:11 -0500
commit70dec0aee9b25e1c9ad75dae71509edd5d1de87d (patch)
tree33b33fae23dea5e1ae5e65f21332086a3d34583c /test/test_exceptions.py
parent1efbc0327aa00b5bdda724c9e76094826ae15a3f (diff)
downloadexternal_python_mako-70dec0aee9b25e1c9ad75dae71509edd5d1de87d.tar.gz
external_python_mako-70dec0aee9b25e1c9ad75dae71509edd5d1de87d.tar.bz2
external_python_mako-70dec0aee9b25e1c9ad75dae71509edd5d1de87d.zip
py3k fixesrel_0_6_2
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r--test/test_exceptions.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py
index 70fe39f..97987e6 100644
--- a/test/test_exceptions.py
+++ b/test/test_exceptions.py
@@ -75,10 +75,16 @@ ${u'привет'}
template.render_unicode()
except exceptions.CompileException, ce:
html_error = exceptions.html_error_template().render()
- assert ("CompileException: Fragment &#39;if 2 == 2: /an "
+ if util.py3k:
+ assert ("CompileException: Fragment &#39;if 2 == 2: /an "
"error&#39; is not a partial control statement "
- "at line: 2 char: 1") in \
+ "at line: 2 char: 1").encode(sys.getdefaultencoding(), 'htmlentityreplace') in \
html_error
+ else:
+ assert ("CompileException: Fragment &#39;if 2 == 2: /an "
+ "error&#39; is not a partial control statement "
+ "at line: 2 char: 1") in \
+ html_error
if util.py3k:
assert u"3 ${&#39;привет&#39;}".encode(sys.getdefaultencoding(),