Skip to content

Commit

Permalink
Merge pull request #1527 from hroncok/py3.11-tracebacks
Browse files Browse the repository at this point in the history
Tests: Adapt expected traceback regexes for Python 3.11.0a1
  • Loading branch information
davidism committed Nov 5, 2021
2 parents acd4e34 + 7577566 commit a83aded
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_debug.py
Expand Up @@ -36,9 +36,11 @@ def test():
test,
r"""
File ".*?broken.html", line 2, in (top-level template code|<module>)
\{\{ fail\(\) \}\}
\{\{ fail\(\) \}\}(
\^{12})?
File ".*debug?.pyc?", line \d+, in <lambda>
tmpl\.render\(fail=lambda: 1 / 0\)
tmpl\.render\(fail=lambda: 1 / 0\)(
~~\^~~)?
ZeroDivisionError: (int(eger)? )?division (or modulo )?by zero
""",
)
Expand Down Expand Up @@ -66,7 +68,8 @@ def test():
test,
r"""
File ".*debug.pyc?", line \d+, in test
raise TemplateSyntaxError\("wtf", 42\)
raise TemplateSyntaxError\("wtf", 42\)(
\^{36})?
(jinja2\.exceptions\.)?TemplateSyntaxError: wtf
line 42""",
)
Expand Down

0 comments on commit a83aded

Please sign in to comment.