diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-08 19:49:48 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-08 20:05:44 -0400 |
commit | eae8e3aaa420f4305450e4f1a55881ea9a46bba0 (patch) | |
tree | cd10db0df59c829076289bd35816dd9fba686090 /test | |
parent | 9b8da4b1e2bdc025b643f2061aa32bf7ae0c78a8 (diff) | |
download | mako-eae8e3aaa420f4305450e4f1a55881ea9a46bba0.tar.gz |
additional test_exceptions fixes
Various fixes to the test suite in the area of exception message rendering
to accommodate for variability in Python versions as well as Pygments.
builds on 9b8da4b1e2bdc025b643f2061aa32 which also
reduced some of the checks for exception message formatting.
also updates black to 22.3.0 as there seem to be some dependency
issues with the older version
Fixes: #360
Change-Id: Ib8916534699e7c57817cf82d53300e50d47d0d50
Diffstat (limited to 'test')
-rw-r--r-- | test/test_exceptions.py | 2 | ||||
-rw-r--r-- | test/test_template.py | 19 |
2 files changed, 9 insertions, 12 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 7a2e6b0..4a90b90 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -173,7 +173,7 @@ ${foobar} ) assert ( - '<div class="sourceline"><table class="syntax-highlightedtable">' + '<table class="syntax-highlightedtable">' in l.get_template("foo.html").render_unicode() ) diff --git a/test/test_template.py b/test/test_template.py index fc1aeca..6e7a309 100644 --- a/test/test_template.py +++ b/test/test_template.py @@ -940,18 +940,15 @@ class ControlTest(TemplateTest): %endfor """ ) - assert ( - result_lines( - t.render( - y=[ - {"test": "one"}, - {"foo": "bar"}, - {"foo": "bar", "test": "two"}, - ] - ) + assert result_lines( + t.render( + y=[ + {"test": "one"}, + {"foo": "bar"}, + {"foo": "bar", "test": "two"}, + ] ) - == ["yes x has test", "no x does not have test", "yes x has test"] - ) + ) == ["yes x has test", "no x does not have test", "yes x has test"] def test_blank_control_1(self): self._do_memory_test( |