~ubuntu-branches/ubuntu/trusty/python-docutils/trusty

« back to all changes in this revision

Viewing changes to debian/patches/fix_element_test.diff

  • Committer: Package Import Robot
  • Author(s): Michael Schutte, Jakub Wilk, Dmitry Shachnev, Michael Schutte
  • Date: 2013-12-21 18:19:15 UTC
  • mfrom: (20.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20131221181915-rjwy5przy0g4sy02
Tags: 0.11-3
[ Jakub Wilk ]
* Remove myself from Uploaders.

[ Dmitry Shachnev ]
* Fix package names in Recommends: python(3)-imaging → python(3)-pil.

[ Michael Schutte ]
* New patch test_nodes-2to3.diff: Do not rely on a bug in 2to3 string
  literal conversion in test_nodes.ElementTests.test_empty, closes: #732679.
  Thanks to Martin Pitt and Jakub Wilk for investigating.
* Increase Standards-Version to 3.9.5; no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
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.
2
 
Author: Martin Pitt <martin.pitt@ubuntu.com>
3
 
Bug-Debian: http://bugs.debian.org/732679
4
 
 
5
 
Index: python-docutils-0.11/test/test_nodes.py
6
 
===================================================================
7
 
--- python-docutils-0.11.orig/test/test_nodes.py        2013-12-20 10:18:46.558264159 +0100
8
 
+++ python-docutils-0.11/test/test_nodes.py     2013-12-20 10:23:56.834258030 +0100
9
 
@@ -92,7 +92,7 @@
10
 
         if sys.version_info < (3,):
11
 
             self.assertEqual(str(element), '<Element mark="\\u2022"/>')
12
 
         else:
13
 
-            self.assertEqual(str(element), '<Element mark="\u2022"/>')
14
 
+            self.assertEqual(str(element), '<Element mark="•"/>')
15
 
         dom = element.asdom()
16
 
         self.assertEqual(dom.toxml(), u'<Element mark="\u2022"/>')
17
 
         dom.unlink()