~ubuntu-branches/ubuntu/wily/python-docutils/wily

« 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, Simon McVittie, Jakub Wilk
  • Date: 2012-02-15 19:21:26 UTC
  • Revision ID: package-import@ubuntu.com-20120215192126-fkqm9dsi1psd09w4
Tags: 0.8.1-5
[ Simon McVittie ]
* Remove myself from Uploaders

[ Jakub Wilk ]
* Backport upstream patch to follow the changes in the
  xml.dom.minidom.Document.toprettyxml method
  (fix-docutilsxmltestcase.diff).
* Drop postinst snippet to deal with a python-support bug (it cannot replace
  directory with a regular file). It was needed only for 0.7 upgrades.
* Suggest fonts-linuxlibertine as an alternative to ttf-linux-libertine.
* Update David Goodger's e-mail address in debian/copyright
  (closes: #653769). Thanks to Jari Aalto for the bug report.
* Update Subversion repository URLs in patch headers (so that they point to
  SourceForge rather than BerliOS).
* Use xargs to iterate over all Python versions.
* Convert rst2odt_prepstyles manpage source from DocBook to
  reStructuredText.
  + Remove docbook-to-man from Build-Depends-Indep.
  + Update debian/rules.
* Don't run dh_testroot in the clean target. There's a good chance that root
  privileges are not needed (e.g. because binary target was run under
  fakeroot), and even if they are actually needed, the target will fail
  quickly.
* Drop obsolete virtual package: docutils-writer-manpage (closes: #631066).
* Run tests with --verbose.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 
11
11
from __init__ import DocutilsTestSupport
12
12
 
 
13
import sys
13
14
import docutils
14
15
import docutils.core
15
16
from docutils._compat import b
29
30
    bodynormal = b('<document source="&lt;string&gt;"><paragraph>Test</paragraph><transition/><paragraph>Test. \xe4\xf6\xfc&#8364;</paragraph></document>')
30
31
    bodynewlines = b("""\
31
32
<document source="&lt;string&gt;">
 
33
<paragraph>Test</paragraph>
 
34
<transition/>
 
35
<paragraph>Test. \xe4\xf6\xfc&#8364;</paragraph>
 
36
</document>
 
37
""")
 
38
    bodynewlines_old = b("""\
 
39
<document source="&lt;string&gt;">
32
40
<paragraph>
33
41
Test
34
42
</paragraph>
40
48
""")
41
49
    bodyindents = b("""\
42
50
<document source="&lt;string&gt;">
 
51
    <paragraph>Test</paragraph>
 
52
    <transition/>
 
53
    <paragraph>Test. \xe4\xf6\xfc&#8364;</paragraph>
 
54
</document>
 
55
""")
 
56
    bodyindents_old = b("""\
 
57
<document source="&lt;string&gt;">
43
58
    <paragraph>
44
59
        Test
45
60
    </paragraph>
79
94
                                          settings_overrides=settings),
80
95
                                         expected)
81
96
 
 
97
    # New formatting introduced in versions 2.7.3 and 3.2.3 on 2011-11-18
 
98
    # to fix http://bugs.python.org/issue4147
 
99
    if (sys.version_info < (2, 7, 3) or
 
100
        sys.version_info[0] == 3 and sys.version_info < (3, 2, 3)):
 
101
        bodynewlines = bodynewlines_old
 
102
        bodyindents = bodyindents_old
 
103
 
82
104
 
83
105
if __name__ == '__main__':
84
106
    import unittest