diff options
Diffstat (limited to 'tests/test_debug.py')
-rw-r--r-- | tests/test_debug.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_debug.py b/tests/test_debug.py index d9c5f7a..aadb9a4 100644 --- a/tests/test_debug.py +++ b/tests/test_debug.py @@ -31,7 +31,19 @@ test_syntax_error = ''' >>> tmpl = MODULE.env.get_template('syntaxerror.html') Traceback (most recent call last): ... -TemplateSyntaxError: unknown tag 'endif' File "loaderres/templates/syntaxerror.html", line 4 {% endif %} +TemplateSyntaxError: unknown tag 'endif' +''' + + +test_regular_syntax_error = ''' +>>> from jinja2.exceptions import TemplateSyntaxError +>>> raise TemplateSyntaxError('wtf', 42) +Traceback (most recent call last): + ... + File "<doctest test_regular_syntax_error[1]>", line 1, in <module> + raise TemplateSyntaxError('wtf', 42) +TemplateSyntaxError: wtf + line 42 ''' |