#176 test_writers.test_docutils_xml.DocutilsXMLTestCase fails

closed-fixed
nobody
None
5
2014-08-27
2011-10-15
Jakub Wilk
No

It looks like recent changes to xml.dom.minidom[0][1] broke test_writers.test_docutils_xml.DocutilsXMLTestCase:

======================================================================
FAIL: test_publish (test_writers.test_docutils_xml.DocutilsXMLTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build/python-docutils-_daXVI/python-docutils-0.8.1/test/test_writers/test_docutils_xml.py", line 80, in test_publish
expected)
File "/build/python-docutils-_daXVI/python-docutils-0.8.1/test/DocutilsTestSupport.py", line 116, in failUnlessEqual
(msg or '%s != %s' % _format_str(first, second))
AssertionError: '''\ <!-- Generated by Docutils 0.8.1 -->
<document source="&lt;string&gt;">
<paragraph>Test </paragraph>
<transition/>
<paragraph>Test. \xe4\xf6\xfc&#8364; </paragraph>
</document>
''' != '''\
<!-- Generated by Docutils 0.8.1 -->
<document source="&lt;string&gt;">
<paragraph>
Test
</paragraph>
<transition/>
<paragraph>
Test. \xe4\xf6\xfc&#8364;
</paragraph>
</document>
'''

[0] http://bugs.python.org/issue4147
[1] http://hg.python.org/cpython/rev/fa0b1e50270f

Discussion

  • Günter Milde

    Günter Milde - 2011-10-17

    Thanks for your bug report. It looks like the test needs either to consider python versions or to be relaxed.
    Can you provide a version test line that could be used to define two variants of the `bodyindents` string
    used in test/test_writers/test_docutils_xml.py?

     
  • Günter Milde

    Günter Milde - 2011-10-20

    Looking at the Debian bugreport http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645369
    I get the impression that this affects only a patched xml.dom.minidom.toprettyxml
    in Debian's "python2.7" package, version 2.7.2-7.

    Putting this in "Pending" status. For a solution, either the patch needs to be revoked or
    we need a recipe to tell the patched module from the original one.

     
  • Günter Milde

    Günter Milde - 2011-10-20
    • status: open --> pending
     
  • Jakub Wilk

    Jakub Wilk - 2011-10-20

    Indeed, when I originally wrote the bug report, I didn't realize that Python in Debian is so heavily patched (it's in fact based on Mercurial snapshot).
    Sorry for the noise.

     
  • Günter Milde

    Günter Milde - 2011-11-24

    Applied the patch from the mailing list with some modifications to separate sample strings from the logic.

    Thanks!

     
  • Günter Milde

    Günter Milde - 2011-11-24
    • status: pending --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks