diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-03-17 16:54:31 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-13 08:48:40 -0400 |
commit | 5780c33e51f1117a641a050c3e0d70f27914f554 (patch) | |
tree | d5ff598aeb048cd6f2531367495e1f2fa921156a /test/test_exceptions.py | |
parent | eae8e3aaa420f4305450e4f1a55881ea9a46bba0 (diff) | |
download | mako-5780c33e51f1117a641a050c3e0d70f27914f554.tar.gz |
Fix test runs without lingua or babel
Defer test imports to fall within exclusion decorators
Support for identifying new 3.11-style error message
Closes: #357
Pull-request: https://github.com/sqlalchemy/mako/pull/357
Pull-request-sha: 44f788b4f3a3c3e1f8328670a2334555163b90e2
Change-Id: I39d59383d92e041e10adc967f51d74839105a1eb
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r-- | test/test_exceptions.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 4a90b90..be573e6 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -274,7 +274,8 @@ ${foobar} html_error = exceptions.html_error_template().render_unicode( error=v, traceback=None ) - assert "local variable 'y'" in html_error + + assert self.indicates_unbound_local_error(html_error, "y") def test_tback_trace_from_py_file(self): t = self._file_template("runtimeerr.html") @@ -284,7 +285,7 @@ ${foobar} except: html_error = exceptions.html_error_template().render_unicode() - assert "local variable 'y'" in html_error + assert self.indicates_unbound_local_error(html_error, "y") def test_code_block_line_number(self): l = TemplateLookup() |