readthedocs / recommonmark

A markdown parser for docutils
https://recommonmark.readthedocs.io/
MIT License
340 stars 252 forks source link

[master/0.6.0] Test tests.test_basic.TestParsing.test_known_schemes fails #190

Closed hartwork closed 2 years ago

hartwork commented 4 years ago
# cd "$(mktemp -d)"
# git clone https://github.com/readthedocs/recommonmark.git
# cd recommonmark/
# python2 setup.py test
[..]
======================================================================
FAIL: test_known_schemes (tests.test_basic.TestParsing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/tmp.CdA844Aah5/recommonmark/tests/test_basic.py", line 263, in test_known_schemes
    """
  File "/tmp/tmp.CdA844Aah5/recommonmark/tests/test_basic.py", line 23, in assertParses
    dedent(parser.document.asdom().toprettyxml(indent='  ')),
AssertionError: '<?xml version="1.0" ?>\n<document source="&lt;string&gt;">\n  <paragraph>\n     [truncated]... != u'<?xml version="1.0" ?>\n<document source="&lt;string&gt;">\n  <paragraph>\n    [truncated]...
  <?xml version="1.0" ?>
  <document source="&lt;string&gt;">
    <paragraph>
      <reference refuri="https://example.com">https link</reference>

      <reference refuri="http://example.com">http link</reference>

      <reference refuri="mailto:admin@example.com">mailto link</reference>

      <reference refuri="custom:example.com">custom scheme</reference>

      <pending_xref refdomain="None" refexplicit="True" reftarget="path/to/file:heading" reftype="any" refwarn="True">
        <reference refuri="path/to/file:heading">ref link</reference>
      </pending_xref>

-     <pending_xref refdomain="None" refexplicit="True" reftarget="path/to/file:heading with spaces" reftype="any" refwarn="True">
-       <reference refuri="path/to/file:heading%20with%20spaces">ref link with spaces</reference>
-     </pending_xref>
+     [
+     ref link with spaces
+     ]
+     (
+     &lt;
+     path/to/file:heading with spaces&gt;)
    </paragraph>
  </document>

----------------------------------------------------------------------
Ran 28 tests in 3.135s

FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=28 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=28 errors=0 failures=1>