mirror of
https://gitee.com/openharmony/third_party_jinja2
synced 2025-03-01 20:15:45 +00:00
Merge pull request #1527 from hroncok/py3.11-tracebacks
Tests: Adapt expected traceback regexes for Python 3.11.0a1
This commit is contained in:
commit
a83aded810
@ -36,9 +36,11 @@ class TestDebug:
|
||||
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
|
||||
""",
|
||||
)
|
||||
@ -66,7 +68,8 @@ to be closed is 'for'.
|
||||
test,
|
||||
r"""
|
||||
File ".*debug.pyc?", line \d+, in test
|
||||
raise TemplateSyntaxError\("wtf", 42\)
|
||||
raise TemplateSyntaxError\("wtf", 42\)(
|
||||
\^{36})?
|
||||
(jinja2\.exceptions\.)?TemplateSyntaxError: wtf
|
||||
line 42""",
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user