Control: tags -1 + patch

On Sat, 4 Feb 2017 14:37:33 +0500 Andrey Rahmatullin <w...@debian.org> wrote:
> Looks like the problem is caused by something in Pygments but apart from
> making sure the version used is the same I don't know how to proceed.

The failure is caused by the recent upload of pygments 2.2.0. With this new
release the 'u' prefix is omitted from the rendered utf8 strings, as in:
 <span class="s1">&#39;&#x43F;&#x440;&#x438;&#x432;&#x435;&#x442;&#39;</span>
while pygments 2.1.3 gives:
 <span class="s1">u&#39;&#x43F;&#x440;&#x438;&#x432;&#x435;&#x442;&#39;</span>

Then I think the two failing tests have to be patched to remove the 'u' prefix
from the assertion (patch attached).

Hope This helps,

_g.
Index: mako-1.0.6+ds1/test/test_exceptions.py
===================================================================
--- mako-1.0.6+ds1.orig/test/test_exceptions.py
+++ mako-1.0.6+ds1/test/test_exceptions.py
@@ -91,7 +91,7 @@ ${u'привет'}
                 assert "".encode(sys.getdefaultencoding(),
                                         'htmlentityreplace') in html_error
             else:
-                assert 'u&#39;'\
+                assert '&#39;'\
                         '&#x43F;&#x440;&#x438;&#x432;&#x435;&#x442;'\
                         '&#39;</span><span class="cp">}</span>'.encode(
                                 sys.getdefaultencoding(),
@@ -220,7 +220,7 @@ ${foobar}
             assert '&#39;привет&#39;</span>' in \
                 l.get_template("foo.html").render().decode('utf-8')
         else:
-            assert 'u&#39;&#x43F;&#x440;&#x438;&#x432;'\
+            assert '&#39;&#x43F;&#x440;&#x438;&#x432;'\
                     '&#x435;&#x442;&#39;</span>' in \
                 l.get_template("foo.html").render().decode('utf-8')
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to