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

« back to all changes in this revision

Viewing changes to test/test_writers/test_docutils_xml.py

  • Committer: Package Import Robot
  • Author(s): Jakub Wilk
  • Date: 2012-03-03 01:40:35 UTC
  • Revision ID: package-import@ubuntu.com-20120303014035-ni524m4xktevt3bn
Tags: 0.8.1-6
* Fix a typo in a patch description.
* Bump standards version to 3.9.3 (no changes needed).
* Don't mention “Dive Into Python” in python*-roman package descriptions
  (closes: #661555). Thanks to Konrad Schöbel for the bug report.
* Remove references to http://diveintopython.org/ from debian/copyright.
* Do not skip tests because of failed imports, as they should never happen.
  (no-test-skipping.diff)
* Check only *.py files when looking for unguarded use of __file__.
* Fix paths in the auto-generated manual pages.
* Split section “Usage” into “Synopsis” and “Description” in the manual
  pages.
* Fool DocutilsXMLTestCase into thinking that Python version is 2.7.3/3.2.3
  when it's in fact 2.7.2/3.2.2 with patched
  xml.dom.minidom.Document.toprettyxml() method (closes: #645369).
  (fix-docutilsxmltestcase.diff).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
import docutils.core
16
16
from docutils._compat import b
17
17
 
 
18
if sys.version_info[:3] in [(2, 7, 2), (3, 2, 2)]:
 
19
    import xml.dom.minidom as minidom
 
20
    if minidom.parseString('<x><y>z</y></x>').toprettyxml() == '<?xml version="1.0" ?>\n<x>\n\t<y>z</y>\n</x>\n':
 
21
        sys_version_info = sys.version_info[:2] + (3, 'candidate', 0)
 
22
        class sys:
 
23
            version_info = sys_version_info
 
24
        del sys_version_info
 
25
    del minidom
18
26
 
19
27
class DocutilsXMLTestCase(DocutilsTestSupport.StandardTestCase):
20
28