Closed
Description
Describe the bug
context
When I build MyST-Parser 0.18.1 for Fedora Rawhide using Sphinx 5.2.3, 4 tests fail.
bug
Those tests fail:
FAILED tests/test_renderers/test_fixtures_sphinx.py::test_sphinx_directives[17-object (`sphinx.directives.ObjectDescription`):]
FAILED tests/test_renderers/test_fixtures_sphinx.py::test_sphinx_directives[400-cmdoption (`sphinx.domains.std.Cmdoption`):]
FAILED tests/test_renderers/test_fixtures_sphinx.py::test_sphinx_directives[415-rst:directive (`sphinx.domains.rst.ReSTDirective`):]
FAILED tests/test_sphinx/test_sphinx_builds.py::test_fieldlist_extension
The most probable cause - new directives added to Sphinx 5.2.3: sphinx-doc/sphinx#10886
Here's an example error message I ran into:
@pytest.mark.param_file(FIXTURE_PATH / "sphinx_directives.md")
def test_sphinx_directives(file_params, sphinx_doctree_no_tr: CreateDoctree):
# TODO fix skipped directives
# TODO test domain directives
if file_params.title.startswith("SKIP") or file_params.title.startswith(
"SPHINX4-SKIP"
):
pytest.skip(file_params.title)
sphinx_doctree_no_tr.set_conf({"extensions": ["myst_parser"]})
pformat = sphinx_doctree_no_tr(file_params.content, "index.md").pformat("index")
# see https://github.com/sphinx-doc/sphinx/issues/9827
pformat = pformat.replace('<glossary sorted="False">', "<glossary>")
# see https://github.com/executablebooks/MyST-Parser/issues/522
if sys.maxsize == 2147483647:
pformat = pformat.replace('"2147483647"', '"9223372036854775807"')
> file_params.assert_expected(pformat, rstrip_lines=True)
E AssertionError: Actual does not match expected
E --- /builddir/build/BUILD/MyST-Parser-0.18.1/tests/test_renderers/fixtures/sphinx_directives.md:415
E +++ (actual)
E @@ -1,7 +1,7 @@
E <document source="<src>/index.md">
E
E <index entries="('single',\ 'a\ (directive)',\ 'directive-a',\ '',\ None)">
E
E - <desc classes="rst directive" desctype="directive" domain="rst" noindex="False" objtype="directive">
E
E - <desc_signature classes="sig sig-object" ids="directive-a">
E
E + <desc classes="rst directive" desctype="directive" domain="rst" nocontentsentry="False" noindex="False" noindexentry="False" objtype="directive">
E
E + <desc_signature _toc_name=".. a::" _toc_parts="('a',)" classes="sig sig-object" fullname="a" ids="directive-a">
E
E <desc_name classes="sig-name descname" xml:space="preserve">
E
E .. a::
E
E <desc_content>
Reproduce the bug
(haven't tested this outside of the build env but I do expect this will manifest)
- Install Sphinx 5.2.3 into your environment.
- Run test suite.
List your environment
No response