From 3287ffb095f15f8707f8935850a8dd466d71e4f1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 9 Mar 2016 18:04:19 -0500 Subject: - reduce the pygments strings we're searching for to accommodate for changes in pygments formatting; we might be losing a bit of what was tested here originally but we still assert pygments is taking place. --- test/test_exceptions.py | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 3330a1f..8321b25 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -91,9 +91,7 @@ ${u'привет'} assert "".encode(sys.getdefaultencoding(), 'htmlentityreplace') in html_error else: - assert '
3
'\ - '
${u''\
+                assert 'u''\
                         'привет'\
                         ''}'.encode(
                                 sys.getdefaultencoding(),
@@ -188,12 +186,8 @@ ${foobar}
         ${self.body()}
         """)
 
-        assert '
'\ - '
3
'\ - '
'\ - '
${'\
-                'foobar}' in \
-            result_lines(l.get_template("foo.html").render_unicode())
+        assert '
' in \ + l.get_template("foo.html").render_unicode() @requires_no_pygments_exceptions def test_format_exceptions_no_pygments(self): @@ -223,24 +217,12 @@ ${foobar} l.put_string("foo.html", """# -*- coding: utf-8 -*-\n${u'привет' + foobar}""") if compat.py3k: - assert '
2
'\ - '
${'\
-                    ''привет' + '\
-                    'foobar}'\
-                    '' in \
-                result_lines(l.get_template("foo.html").render().decode('utf-8'))
+            assert ''привет'' in \
+                l.get_template("foo.html").render().decode('utf-8')
         else:
-            assert '
2
'\ - '
${'\
-                    'u'прив'\
-                    'ет' + '\
-                    'foobar}'\
-                    '' in \
-                result_lines(l.get_template("foo.html").render().decode('utf-8'))
+            assert 'u'прив'\
+                    'ет'' in \
+                l.get_template("foo.html").render().decode('utf-8')
 
     @requires_no_pygments_exceptions
     def test_utf8_format_exceptions_no_pygments(self):
-- 
cgit v1.2.1