Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with Sphinx 7.1.2 #18

Closed
pgalbraith opened this issue Aug 26, 2023 · 1 comment · Fixed by #22
Closed

Test failure with Sphinx 7.1.2 #18

pgalbraith opened this issue Aug 26, 2023 · 1 comment · Fixed by #22

Comments

@pgalbraith
Copy link

I am getting the following test failures with Sphinx 7.1.2 & python 3.10:

<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="3" skipped="0" tests="4" time="0.988" timestamp="2023-08-26T11:51:46.387839" hostname="EDORAS"><testcase classname="tests.test_basic" name="test_basic" time="0.333"><failure message="assert '&lt;document so...\n        abc' == '&lt;document so...\n        abc'&#10;  - &lt;document source=&quot;&lt;src&gt;/index.rst&quot;&gt;&#10;  + &lt;document source=&quot;&lt;src&gt;/index.rst&quot; translation_progress=&quot;{'total': 0, 'translated': 0}&quot;&gt;&#10;        &lt;paragraph&gt;&#10;            abc">sphinx_doctree = &lt;sphinx_pytest.plugin.CreateDoctree object at 0x000001CD00275FD0&gt;

    def test_basic(sphinx_doctree):
        result = sphinx_doctree("abc")
&gt;       assert (
            result.pformat()
            == '&lt;document source="&lt;src&gt;/index.rst"&gt;\n    &lt;paragraph&gt;\n        abc'
        )
E       assert '&lt;document so...\n        abc' == '&lt;document so...\n        abc'
E         - &lt;document source="&lt;src&gt;/index.rst"&gt;
E         + &lt;document source="&lt;src&gt;/index.rst" translation_progress="{'total': 0, 'translated': 0}"&gt;
E               &lt;paragraph&gt;
E                   abc

tests\test_basic.py:3: AssertionError</failure></testcase><testcase classname="tests.test_basic" name="test_no_transforms" time="0.054" /><testcase classname="tests.test_basic" name="test_with_transforms" time="0.034"><failure message="assert '&lt;document so...       header' == '&lt;document so...       header'&#10;  - &lt;document source=&quot;&lt;src&gt;/index.rst&quot;&gt;&#10;  + &lt;document source=&quot;&lt;src&gt;/index.rst&quot; translation_progress=&quot;{'total': 0, 'translated': 0}&quot;&gt;&#10;        &lt;target refid=&quot;target&quot;&gt;&#10;        &lt;section ids=&quot;header target&quot; names=&quot;header target&quot;&gt;&#10;            &lt;title&gt;&#10;                header">sphinx_doctree = &lt;sphinx_pytest.plugin.CreateDoctree object at 0x000001CD01305810&gt;

    def test_with_transforms(sphinx_doctree):
        """Return the doctree, after transforms (but not post-transforms)."""
        result = sphinx_doctree(".. _target:\n\nheader\n------\n")
&gt;       assert (
            result.pformat()
            == """\
    &lt;document source="&lt;src&gt;/index.rst"&gt;
        &lt;target refid="target"&gt;
        &lt;section ids="header target" names="header target"&gt;
            &lt;title&gt;
                header
    """.rstrip()
        )
E       assert '&lt;document so...       header' == '&lt;document so...       header'
E         - &lt;document source="&lt;src&gt;/index.rst"&gt;
E         + &lt;document source="&lt;src&gt;/index.rst" translation_progress="{'total': 0, 'translated': 0}"&gt;
E               &lt;target refid="target"&gt;
E               &lt;section ids="header target" names="header target"&gt;
E                   &lt;title&gt;
E                       header

tests\test_basic.py:27: AssertionError</failure></testcase><testcase classname="tests.test_basic" name="test_html_builder" time="0.251"><failure message="assert '&lt;document so...e=&quot;preserve&quot;&gt;' == '&lt;document so...e=&quot;preserve&quot;&gt;'&#10;  - &lt;document source=&quot;&lt;src&gt;/index.rst&quot;&gt;&#10;  + &lt;document source=&quot;&lt;src&gt;/index.rst&quot; translation_progress=&quot;{'total': 0, 'translated': 0}&quot;&gt;&#10;        &lt;paragraph&gt;&#10;            abc&#10;        &lt;comment xml:space=&quot;preserve&quot;&gt;">sphinx_doctree = &lt;sphinx_pytest.plugin.CreateDoctree object at 0x000001CD01315D50&gt;

    def test_html_builder(sphinx_doctree):
        sphinx_doctree.buildername = "html"
        result = sphinx_doctree(".. only:: html\n\n   abc\n\n.. only:: latex\n\n   xyz\n")
&gt;       assert (
            result.get_resolved_pformat()
            == '&lt;document source="&lt;src&gt;/index.rst"&gt;\n    &lt;paragraph&gt;\n        abc'
            '\n    &lt;comment xml:space="preserve"&gt;'
        )
E       assert '&lt;document so...e="preserve"&gt;' == '&lt;document so...e="preserve"&gt;'
E         - &lt;document source="&lt;src&gt;/index.rst"&gt;
E         + &lt;document source="&lt;src&gt;/index.rst" translation_progress="{'total': 0, 'translated': 0}"&gt;
E               &lt;paragraph&gt;
E                   abc
E               &lt;comment xml:space="preserve"&gt;

tests\test_basic.py:42: AssertionError</failure></testcase></testsuite></testsuites>
@opoplawski
Copy link

python-sphinx-pytest is failing to build in Fedora Rawhide because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants