[Python-modules-team] Bug#732679: test_nodes.ElementTests.test_empty fails for py3: "=?UTF-8?Q?=E2=80=A2?=" != "\\u2022"

Martin Pitt martin.pitt at ubuntu.com
Fri Dec 20 10:00:56 UTC 2013


tag 732679 patch
user ubuntu-devel at lists.ubuntu.com
usertags 732679 origin-ubuntu ubuntu-patch trusty
thanks

I uploaded this diff to Ubuntu which just built (i. e. tests run
during package build), and I locally tested it with autopkgtest and in
sid.

Thanks for considering,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
diff -Nru python-docutils-0.11/debian/changelog python-docutils-0.11/debian/changelog
--- python-docutils-0.11/debian/changelog	2013-09-09 22:59:15.000000000 +0200
+++ python-docutils-0.11/debian/changelog	2013-12-20 10:32:05.000000000 +0100
@@ -1,3 +1,13 @@
+python-docutils (0.11-2ubuntu1) trusty; urgency=medium
+
+  * Add fix_element_test.diff: Since Python 3.3.3, 2to3 changes our already
+    existing Python3 specific test for the "dot" (?) symbol to a double-slash
+    like in the Python 2 version, breaking the test. Use the actual Unicode
+    symbol to prevent 2to3 from doing that, instead of \u2022.
+    (Closes: #732679)
+
+ -- Martin Pitt <martin.pitt at ubuntu.com>  Fri, 20 Dec 2013 10:24:09 +0100
+
 python-docutils (0.11-2) unstable; urgency=low
 
   [ Michael Schutte ]
diff -Nru python-docutils-0.11/debian/patches/fix_element_test.diff python-docutils-0.11/debian/patches/fix_element_test.diff
--- python-docutils-0.11/debian/patches/fix_element_test.diff	1970-01-01 01:00:00.000000000 +0100
+++ python-docutils-0.11/debian/patches/fix_element_test.diff	2013-12-20 10:32:05.000000000 +0100
@@ -0,0 +1,17 @@
+Description: Since Python 3.3.3, 2to3 changes our already existing Python3 specific test for the "dot" (?) symbol to a double-slash like in the Python 2 version, breaking the test. Use the actual Unicode symbol to prevent 2to3 from doing that, instead of \u2022.
+Author: Martin Pitt <martin.pitt at ubuntu.com>
+Bug-Debian: http://bugs.debian.org/732679
+
+Index: python-docutils-0.11/test/test_nodes.py
+===================================================================
+--- python-docutils-0.11.orig/test/test_nodes.py	2013-12-20 10:18:46.558264159 +0100
++++ python-docutils-0.11/test/test_nodes.py	2013-12-20 10:23:56.834258030 +0100
+@@ -92,7 +92,7 @@
+         if sys.version_info < (3,):
+             self.assertEqual(str(element), '<Element mark="\\u2022"/>')
+         else:
+-            self.assertEqual(str(element), '<Element mark="\u2022"/>')
++            self.assertEqual(str(element), '<Element mark="?"/>')
+         dom = element.asdom()
+         self.assertEqual(dom.toxml(), u'<Element mark="\u2022"/>')
+         dom.unlink()
diff -Nru python-docutils-0.11/debian/patches/series python-docutils-0.11/debian/patches/series
--- python-docutils-0.11/debian/patches/series	2013-08-05 16:35:22.000000000 +0200
+++ python-docutils-0.11/debian/patches/series	2013-12-20 10:32:05.000000000 +0100
@@ -11,3 +11,4 @@
 no-local-roman.diff
 rst2odt_prepstyles-elementtree.diff
 odt-writer-ascii-filenames.diff
+fix_element_test.diff


More information about the Python-modules-team mailing list