diff options
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r-- | test/test_exceptions.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 1ddca4f..70fe39f 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -20,8 +20,8 @@ class ExceptionsTest(TemplateTest): assert False except exceptions.CompileException, ce: html_error = exceptions.html_error_template().render_unicode() - assert ("CompileException: Fragment 'i = 0' is not a partial " - "control statement") in html_error + assert ("CompileException: Fragment 'i = 0' is not " + "a partial control statement at line: 2 char: 1") in html_error assert '<style>' in html_error html_error_stripped = html_error.strip() assert html_error_stripped.startswith('<html>') @@ -75,10 +75,10 @@ ${u'привет'} template.render_unicode() except exceptions.CompileException, ce: html_error = exceptions.html_error_template().render() - assert ("CompileException: Fragment 'if 2 == 2: /an " - "error' is not a partial control " - "statement at line: 2 char: 1") in \ - html_error.decode('utf-8') + assert ("CompileException: Fragment 'if 2 == 2: /an " + "error' is not a partial control statement " + "at line: 2 char: 1") in \ + html_error if util.py3k: assert u"3 ${'привет'}".encode(sys.getdefaultencoding(), @@ -185,5 +185,4 @@ ${foobar} # and don't even send what we have. html_error = exceptions.html_error_template().\ render_unicode(error=v, traceback=None) - - assert "local variable 'y' referenced" in html_error + assert "local variable 'y' referenced before assignment" in html_error |