executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
759 stars 196 forks source link

Tests fail with Sphinx 8.1.3 #997

Closed heirecka closed 2 weeks ago

heirecka commented 2 weeks ago

What version of myst-parser are you using?

4.0.0 (+8ea56455aa87feb2d96bf29c335bca5dc885b77b)

What version dependencies are you using?

docutils-0.21.2 jinja2-3.1.4 markdown-it-py-3.0.0 mdit-py-plugins-0.4.2 pyyaml-6.0.2 sphinx-8.1.3

What operating system are you using?

Mac

Describe the Bug

Truncated log, I'll try to add the full one in an additional comment if github lets me.

platform linux -- Python 3.11.10, pytest-8.1.1, pluggy-1.5.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0
configfile: pyproject.toml
plugins: flaky-3.8.1, asyncio-0.23.8, cov-4.1.0, datadir-1.5.0, dependency-0.5.1, expect-1.1.0, forked-1.6.0, pytest_httpserver-1.0.8, mock-3.14.0, pytest_param_files-0.6.0, regressions-2.5.0, services-2.2.1, socket-0.7.0, subtests-0.13.1, timeout-2.3.1, trio-0.8.0, xdist-3.6.1, xprocess-1.0.2, requests-mock-1.12.1, respx-0.21.1, sphinx_pytest-0.2.0, typeguard-4.3.0, django-4.9.0, jaraco.test-5.5.1, pyfakefs-5.7.1, anyio-4.6.2, benchmark-4.0.0, Faker-30.8.2, hypothesis-6.116.0
asyncio: mode=Mode.STRICT
collected 1095 items / 5 deselected / 1090 selected                                                                                                                               

[...]

============================================================================= short test summary info =============================================================================
FAILED tests/test_sphinx/test_sphinx_builds.py::test_basic - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_references - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_references_singlehtml - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_heading_slug_func - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_includes - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_footnotes - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_commonmark_only - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_substitutions - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_gettext_html - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_fieldlist_extension - AssertionError: FILES DIFFER:
=========================================================== 10 failed, 1069 passed, 11 skipped, 5 deselected in 17.00s ============================================================

Expected Behavior

Tests pass

To Reproduce

No response

heirecka commented 2 weeks ago

Full test log:

platform linux -- Python 3.11.10, pytest-8.1.1, pluggy-1.5.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0
configfile: pyproject.toml
plugins: flaky-3.8.1, asyncio-0.23.8, cov-4.1.0, datadir-1.5.0, dependency-0.5.1, expect-1.1.0, forked-1.6.0, pytest_httpserver-1.0.8, mock-3.14.0, pytest_param_files-0.6.0, regressions-2.5.0, services-2.2.1, socket-0.7.0, subtests-0.13.1, timeout-2.3.1, trio-0.8.0, xdist-3.6.1, xprocess-1.0.2, requests-mock-1.12.1, respx-0.21.1, sphinx_pytest-0.2.0, typeguard-4.3.0, django-4.9.0, jaraco.test-5.5.1, pyfakefs-5.7.1, anyio-4.6.2, benchmark-4.0.0, Faker-30.8.2, hypothesis-6.116.0
asyncio: mode=Mode.STRICT
collected 1095 items / 5 deselected / 1090 selected                                                                                                                               

tests/test_anchors.py .                                                                                                                                                     [  0%]
tests/test_commonmark/test_commonmark.py .............s...................................................s.s.............................................................. [ 12%]
........................................................................................................................................................................... [ 27%]
........................................................................................................................................................................... [ 43%]
........................................................................................................................................................................... [ 59%]
......                                                                                                                                                                      [ 59%]
tests/test_docutils.py ...........                                                                                                                                          [ 60%]
tests/test_html/test_html_to_nodes.py .................                                                                                                                     [ 62%]
tests/test_html/test_parse_html.py .....................                                                                                                                    [ 64%]
tests/test_inventory.py ..............                                                                                                                                      [ 65%]
tests/test_renderers/test_error_reporting.py ...................                                                                                                            [ 67%]
tests/test_renderers/test_fixtures_docutils.py .................................................................................................                            [ 76%]
tests/test_renderers/test_fixtures_sphinx.py ......................................................................s...........s.s.........s..s................ss.......... [ 87%]
....................s............................                                                                                                                           [ 92%]
tests/test_renderers/test_include_directive.py ........                                                                                                                     [ 92%]
tests/test_renderers/test_myst_config.py ....................                                                                                                               [ 94%]
tests/test_renderers/test_myst_refs.py .........                                                                                                                            [ 95%]
tests/test_renderers/test_parse_directives.py .................................                                                                                             [ 98%]
tests/test_sphinx/test_sphinx_builds.py FFFFF.FFF.F..F..                                                                                                                    [100%]

==================================================================================== FAILURES =====================================================================================
___________________________________________________________________________________ test_basic ____________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c95e7230a0>, warning = <_io.StringIO object at 0x72c95e723250>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c969d937e0>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c95a3b4a40>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "basic"),
        freshenv=True,
        confoverrides={"myst_enable_extensions": ["dollarmath"]},
    )
    def test_basic(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """basic test."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(
                app,
                docname="content",
                regress=True,
                replace={
                    # changed in sphinx 7.1
                    '<literal classes="code" language="">': '<literal classes="code">',
                },
            )
        finally:
            get_sphinx_app_doctree(
                app,
                docname="content",
                resolve=True,
                regress=True,
                replace={
                    # changed in sphinx 7.1
                    '<literal classes="code" language="">': '<literal classes="code">',
                },
            )
>       get_sphinx_app_output(
            app,
            filename="content.html",
            regress_html=True,
            regress_ext=".html",
        )

tests/test_sphinx/test_sphinx_builds.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'content.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html', replace = None

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_basic0/test_sphinx_builds/test_basic.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_basic0/test_sphinx_builds/test_basic.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_basic0/test_sphinx_builds/test_basic.obtained.diff.html
E           --- 
E           +++ 
E           @@ -247,6 +247,8 @@
E                 57 words | 0 min read
E                </p>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/basic
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/basic/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'dollarmath'}, disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] content
reading sources... [ 67%] index
reading sources... [100%] orphan

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/basic/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/basic/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/basic/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] content
writing output... [ 67%] index
writing output... [100%] orphan

generating indices... genindex done
writing additional pages... search done
copying images... [100%] example.jpg

dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/basic/_build/html.

# warning: 

_________________________________________________________________________________ test_references _________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c9784f4ca0>, warning = <_io.StringIO object at 0x72c959f231c0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c95a07c180>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c95a07e7a0>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "references"),
        freshenv=True,
        confoverrides={
            "myst_enable_extensions": ["dollarmath"],
            "show_warning_types": True,
        },
    )
    def test_references(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test reference resolution."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        # should be one warning:
        # WARNING: Multiple matches found for 'duplicate':
        # inter:py:module:duplicate, inter:std:label:duplicate [myst.iref_ambiguous]
        warnings = warning.getvalue().strip().splitlines()
        assert len(warnings) == 1
        assert "[myst.iref_ambiguous]" in warnings[0]

        try:
            get_sphinx_app_doctree(app, docname="index", regress=True)
        finally:
            try:
                get_sphinx_app_doctree(app, docname="index", resolve=True, regress=True)
            finally:
>               get_sphinx_app_output(
                    app,
                    filename="index.html",
                    regress_html=True,
                    replace={"Permalink to this headline": "Permalink to this heading"},
                )

tests/test_sphinx/test_sphinx_builds.py:117: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {'Permalink to this headline': 'Permalink to this heading'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references0/test_sphinx_builds/test_references.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references0/test_sphinx_builds/test_references.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references0/test_sphinx_builds/test_references.obtained.diff.html
E           --- 
E           +++ 
E           @@ -277,6 +277,8 @@
E                 </a>
E                </p>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'dollarmath'}, disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=2, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
loading intersphinx inventory 'inter' from objects.inv ...
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] index
reading sources... [ 67%] other
reading sources... [100%] subfolder/other2

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying downloadable files... [ 50%] ../../../file_link.txt
copying downloadable files... [100%] ../../../subfolder/file_link2.txt

copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] index
writing output... [ 67%] other
writing output... [100%] subfolder/other2

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in tests/test_sphinx/sourcedirs/references/_build/html.

# warning: 
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/index.md:69: WARNING: Multiple matches found for 'duplicate': inter:py:module:duplicate, inter:std:label:duplicate [myst.iref_ambiguous]
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references/index.md:69: WARNING: Multiple matches found for 'duplicate': inter:py:module:duplicate, inter:std:label:duplicate [myst.iref_ambiguous]

___________________________________________________________________________ test_references_singlehtml ____________________________________________________________________________

app = <SphinxTestApp buildername='singlehtml'>, status = <_io.StringIO object at 0x72c959f220e0>, warning = <_io.StringIO object at 0x72c959f22b00>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c959fc1300>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c959fc2fc0>

    @pytest.mark.sphinx(
        buildername="singlehtml",
        srcdir=os.path.join(SOURCE_DIR, "references_singlehtml"),
        freshenv=True,
        confoverrides={"nitpicky": True},
    )
    def test_references_singlehtml(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test reference resolution for singlehtml builds."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        # try:
        #     get_sphinx_app_doctree(app, docname="index", regress=True)
        # finally:
        #     get_sphinx_app_doctree(app, docname="index", resolve=True, regress=True)

        try:
            get_sphinx_app_doctree(
                app,
                docname="other/other",
                regress=True,
                replace={"other\\other.md": "other/other.md"},
            )
        finally:
            get_sphinx_app_doctree(
                app,
                docname="other/other",
                resolve=True,
                regress=True,
                replace={
                    "other\\other.md": "other/other.md",
                    # changed in sphinx 7.3
                    '="#document-index': '="index.html#document-index',
                    '="#document-other': '="index.html#document-other',
                },
            )

>       get_sphinx_app_output(
            app,
            filename="index.html",
            buildername="singlehtml",
            regress_html=True,
            replace={
                "Permalink to this headline": "Permalink to this heading",
                # changed in sphinx 7.3
                '="#document-index': '="index.html#document-index',
                '="#document-other': '="index.html#document-other',
            },
        )

tests/test_sphinx/test_sphinx_builds.py:171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='singlehtml'>, buildername = 'singlehtml', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {'="#document-index': '="index.html#document-index', '="#document-other': '="index.html#document-other', 'Permalink to this headline': 'Permalink to this heading'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references_singlehtml0/test_sphinx_builds/test_references_singlehtml.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references_singlehtml0/test_sphinx_builds/test_references_singlehtml.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_references_singlehtml0/test_sphinx_builds/test_references_singlehtml.obtained.diff.html
E           --- 
E           +++ 
E           @@ -50,7 +50,7 @@
E                     </a>
E                    </p>
E                    <p>
E           -         <a class="reference internal" href="index.html#title">
E           +         <a class="reference internal" href="#title">
E                      <span class="std std-ref">
E                       Title
E                      </span>
E           @@ -99,13 +99,15 @@
E                 </a>
E                </p>
E                <p>
E           -     <a class="reference internal" href="index.html#other-title">
E           +     <a class="reference internal" href="#other-title">
E                  <span class="std std-ref">
E                   Other Title
E                  </span>
E                 </a>
E                </p>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: singlehtml
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=2, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [singlehtml]: all documents
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [ 25%] index
reading sources... [ 50%] other/index
reading sources... [ 75%] other/other
reading sources... [100%] other/other2

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
assembling single document... 
index
 other/index
  other/other
  other/other2
assembling single document: done
writing... done
writing additional files... done
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
dumping object inventory... done
build succeeded.

The HTML page is in tests/test_sphinx/sourcedirs/references_singlehtml/_build/singlehtml.

# warning: 

_____________________________________________________________________________ test_heading_slug_func ______________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c959f22ef0>, warning = <_io.StringIO object at 0x72c959f3c1f0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c959ffae80>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c959ffad40>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "heading_slug_func"),
        freshenv=True,
    )
    def test_heading_slug_func(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test heading_slug_func configuration."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(app, docname="index", regress=True)
        finally:
            get_sphinx_app_doctree(app, docname="index", resolve=True, regress=True)
>       get_sphinx_app_output(
            app,
            filename="index.html",
            regress_html=True,
            replace={"Permalink to this headline": "Permalink to this heading"},
        )

tests/test_sphinx/test_sphinx_builds.py:208: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {'Permalink to this headline': 'Permalink to this heading'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_heading_slug_func0/test_sphinx_builds/test_heading_slug_func.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_heading_slug_func0/test_sphinx_builds/test_heading_slug_func.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_heading_slug_func0/test_sphinx_builds/test_heading_slug_func.obtained.diff.html
E           --- 
E           +++ 
E           @@ -17,6 +17,8 @@
E                 </h2>
E                </section>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/heading_slug_func
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/heading_slug_func/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=2, heading_slug_func=<function make_id at 0x72c9800dc180>, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/heading_slug_func/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/heading_slug_func/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/heading_slug_func/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/heading_slug_func/_build/html.

# warning: 

__________________________________________________________________________________ test_includes __________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c959f3d870>, warning = <_io.StringIO object at 0x72c959f3dab0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c959d38c20>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c959d3ac00>

    @pytest.mark.sphinx(
        buildername="html", srcdir=os.path.join(SOURCE_DIR, "includes"), freshenv=True
    )
    def test_includes(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test of include directive."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(
                app,
                docname="index",
                regress=True,
                rstrip_lines=True,
                # fix for Windows CI
                replace={
                    r"subfolder\example2.jpg": "subfolder/example2.jpg",
                    r"subfolder\\example2.jpg": "subfolder/example2.jpg",
                    r"subfolder\\\\example2.jpg": "subfolder/example2.jpg",
                    # added in sphinx 7.2 (#9846)
                    'original_uri="/subfolder/example2.jpg" ': "",
                },
            )
        finally:
>           get_sphinx_app_output(
                app,
                filename="index.html",
                regress_html=True,
                replace={
                    "Permalink to this headline": "Permalink to this heading",
                    r"'subfolder\\example2'": "'subfolder/example2'",
                    r'uri="subfolder\\example2"': 'uri="subfolder/example2"',
                    "_images/example21.jpg": "_images/example2.jpg",
                },
            )

tests/test_sphinx/test_sphinx_builds.py:286: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {"'subfolder\\\\example2'": "'subfolder/example2'", 'Permalink to this headline': 'Permalink to this heading', '_images/example21.jpg': '_images/example2.jpg', 'uri="subfolder\\\\example2"': 'uri="subfolder/example2"'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_includes0/test_sphinx_builds/test_includes.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_includes0/test_sphinx_builds/test_includes.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_includes0/test_sphinx_builds/test_includes.obtained.diff.html
E           --- 
E           +++ 
E           @@ -143,6 +143,8 @@
E                 </section>
E                </section>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/includes
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/includes/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/includes/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/includes/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/includes/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
copying images... [ 50%] example1.jpg
copying images... [100%] subfolder/example2.jpg

dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/includes/_build/html.

# warning: 

_________________________________________________________________________________ test_footnotes __________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c959dc60e0>, warning = <_io.StringIO object at 0x72c959dc6440>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c959c4e2a0>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c959c4e480>

    @pytest.mark.sphinx(
        buildername="html", srcdir=os.path.join(SOURCE_DIR, "footnotes"), freshenv=True
    )
    def test_footnotes(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test of include directive."""
        app.build()

        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = strip_colors(warning.getvalue()).replace(
            str(app.srcdir) + os.path.sep, "source/"
        )
        # print(warnings)
        assert (
            warnings.strip()
            == """
    source/footnote_md.md:29: WARNING: Footnote [1] is not referenced. [ref.footnote]
    source/footnote_md.md:31: WARNING: Footnote [#] is not referenced. [ref.footnote]
    source/footnote_rst.rst:26: WARNING: Footnote [1] is not referenced. [ref.footnote]
    source/footnote_rst.rst:28: WARNING: Footnote [#] is not referenced. [ref.footnote]
    """.strip()
        )

        try:
            get_sphinx_app_doctree(app, docname="footnote_md", regress=True)
        finally:
>           get_sphinx_app_output(
                app,
                filename="footnote_md.html",
                regress_html=True,
                regress_ext=".html",
                replace={
                    'role="note">': 'role="doc-footnote">',  # changed in docutils 0.20
                },
            )

tests/test_sphinx/test_sphinx_builds.py:356: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'footnote_md.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {'role="note">': 'role="doc-footnote">'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_footnotes0/test_sphinx_builds/test_footnotes.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_footnotes0/test_sphinx_builds/test_footnotes.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_footnotes0/test_sphinx_builds/test_footnotes.obtained.diff.html
E           --- 
E           +++ 
E           @@ -244,6 +244,8 @@
E                 </p>
E                </aside>
E               </aside>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] footnote_md
reading sources... [ 67%] footnote_rst
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] footnote_md
writing output... [ 67%] footnote_rst
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 4 warnings.

The HTML pages are in tests/test_sphinx/sourcedirs/footnotes/_build/html.

# warning: 
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/footnote_md.md:29: WARNING: Footnote [1] is not referenced. [ref.footnote]
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/footnote_md.md:31: WARNING: Footnote [#] is not referenced. [ref.footnote]
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst:26: WARNING: Footnote [1] is not referenced. [ref.footnote]
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/footnotes/footnote_rst.rst:28: WARNING: Footnote [#] is not referenced. [ref.footnote]

______________________________________________________________________________ test_commonmark_only _______________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c959dc64d0>, warning = <_io.StringIO object at 0x72c959dc6b90>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c959ce6840>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c959ce6520>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "commonmark_only"),
        freshenv=True,
    )
    def test_commonmark_only(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """test setting addition configuration values."""
        app.build()
        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert "lexer name '{note}'" in warnings

        try:
            get_sphinx_app_doctree(app, docname="index", regress=True)
        finally:
>           get_sphinx_app_output(
                app,
                filename="index.html",
                regress_html=True,
                replace={"Permalink to this headline": "Permalink to this heading"},
            )

tests/test_sphinx/test_sphinx_builds.py:388: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {'Permalink to this headline': 'Permalink to this heading'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_commonmark_only0/test_sphinx_builds/test_commonmark_only.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_commonmark_only0/test_sphinx_builds/test_commonmark_only.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_commonmark_only0/test_sphinx_builds/test_commonmark_only.obtained.diff.html
E           --- 
E           +++ 
E           @@ -23,6 +23,8 @@
E                 </code>
E                </p>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=True, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in tests/test_sphinx/sourcedirs/commonmark_only/_build/html.

# warning: 
/var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/commonmark_only/index.md:3: WARNING: Pygments lexer name '{note}' is not known

_______________________________________________________________________________ test_substitutions ________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c959dc65f0>, warning = <_io.StringIO object at 0x72c9509af400>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c95083dbc0>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c95083ec00>
file_regression = <pytest_regressions.file_regression.FileRegressionFixture object at 0x72c9508a3b90>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "substitutions"),
        freshenv=True,
    )
    def test_substitutions(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
        file_regression,
    ):
        """test setting addition configuration values."""
        app.build()
        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(app, docname="index", regress=True)
            file_regression.check(
                get_sphinx_app_doctree(app, docname="other").pformat(),
                extension=".other.xml",
            )
        finally:
>           get_sphinx_app_output(app, filename="index.html", regress_html=True)

tests/test_sphinx/test_sphinx_builds.py:422: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html', replace = None

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_substitutions0/test_sphinx_builds/test_substitutions.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_substitutions0/test_sphinx_builds/test_substitutions.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_substitutions0/test_sphinx_builds/test_substitutions.obtained.diff.html
E           --- 
E           +++ 
E           @@ -86,6 +86,8 @@
E               <p>
E                value1
E               </p>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/substitutions
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/substitutions/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'substitution'}, disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={conf: ..., override: ...}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] index
reading sources... [100%] other

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/substitutions/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/substitutions/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/substitutions/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 50%] index
writing output... [100%] other

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/substitutions/_build/html.

# warning: 

________________________________________________________________________________ test_gettext_html ________________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c9509af910>, warning = <_io.StringIO object at 0x72c950715fc0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c95078d940>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c95078d580>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "gettext"),
        freshenv=True,
        confoverrides={"language": "fr", "gettext_compact": False, "locale_dirs": ["."]},
    )
    def test_gettext_html(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """Test gettext message extraction."""
        app.build()
        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(
                app,
                docname="index",
                regress=True,
            )
        finally:
            get_sphinx_app_doctree(
                app,
                docname="index",
                resolve=True,
                regress=True,
            )
>       get_sphinx_app_output(
            app,
            filename="index.html",
            regress_html=True,
            regress_ext=".html",
            replace={
                # upstream bug https://github.com/sphinx-doc/sphinx/issues/11689
                '"Permalink to this heading"': '"Lien permanent vers cette rubrique"',
                # which was fixed to a different translation in sphinx 7.3
                '"Lien vers cette rubrique"': '"Lien permanent vers cette rubrique"',
                # changed in docutils>0.19
                ' role="note">': ' role="doc-footnote">',
            },
        )

tests/test_sphinx/test_sphinx_builds.py:482: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html'
replace = {' role="note">': ' role="doc-footnote">', '"Lien vers cette rubrique"': '"Lien permanent vers cette rubrique"', '"Permalink to this heading"': '"Lien permanent vers cette rubrique"'}

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_gettext_html0/test_sphinx_builds/test_gettext_html.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_gettext_html0/test_sphinx_builds/test_gettext_html.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_gettext_html0/test_sphinx_builds/test_gettext_html.obtained.diff.html
E           --- 
E           +++ 
E           @@ -213,6 +213,8 @@
E                 </p>
E                </aside>
E               </aside>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/gettext
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/gettext/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [fr]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'deflist'}, disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 1 po files that are out of date
writing output... [100%] fr/LC_MESSAGES/index.mo

building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/gettext/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/gettext/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/gettext/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
copying images... [ 50%] poisson-amusant.png
copying images... [100%] fun-fish.png

dumping search index in French (code: fr)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/gettext/_build/html.

# warning: 

____________________________________________________________________________ test_fieldlist_extension _____________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x72c95070aef0>, warning = <_io.StringIO object at 0x72c95070b5b0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x72c9506a7060>
get_sphinx_app_output = <function get_sphinx_app_output.<locals>.read at 0x72c9506a6700>

    @pytest.mark.sphinx(
        buildername="html",
        srcdir=os.path.join(SOURCE_DIR, "fieldlist"),
        freshenv=True,
    )
    def test_fieldlist_extension(
        app,
        status,
        warning,
        get_sphinx_app_doctree,
        get_sphinx_app_output,
    ):
        """test setting addition configuration values."""
        app.build()
        assert "build succeeded" in status.getvalue()  # Build succeeded
        warnings = warning.getvalue().strip()
        assert warnings == ""

        try:
            get_sphinx_app_doctree(
                app,
                docname="index",
                regress=True,
                replace={
                    # changed in sphinx 7.2 for desc_sig_name node
                    'classes="n n"': 'classes="n"',
                    # changed in sphinx 7.2 for desc_parameterlist node
                    'multi_line_parameter_list="False" ': "",
                    # changed in sphinx 7.1 (but fixed in 7.2) for desc_signature/desc_name nodes
                    'classes="sig sig-object sig sig-object"': 'classes="sig sig-object"',
                    'classes="sig-name descname sig-name descname"': 'classes="sig-name descname"',
                    # changed in sphinx 7.2 (#11533)
                    (
                        'no-contents-entry="False" no-index="False" '
                        'no-index-entry="False" no-typesetting="False" '
                    ): "",
                },
            )
        finally:
>           get_sphinx_app_output(
                app,
                filename="index.html",
                regress_html=True,
                regress_ext=".html",
            )

tests/test_sphinx/test_sphinx_builds.py:594: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <SphinxTestApp buildername='html'>, buildername = 'html', filename = 'index.html', encoding = 'utf-8', regress_html = True, regress_ext = '.html', replace = None

    def read(
        app,
        buildername="html",
        filename="index.html",
        encoding="utf-8",
        regress_html=False,
        regress_ext=".html",
        replace=None,
    ):
        outpath = pathlib.Path(str(app.srcdir), "_build", buildername, filename)
        if not outpath.exists():
            raise OSError(f"no output file exists: {outpath}")

        content = outpath.read_text(encoding=encoding)

        if regress_html:
            # only regress the inner body, since other sections are non-deterministic
            soup = BeautifulSoup(content, "html.parser")
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            # pygments 2.11.0 introduces a whitespace tag
            for pygment_whitespace in doc_div.select("pre > span.w"):
                pygment_whitespace.replace_with(pygment_whitespace.text)
            text = doc_div.prettify()
            # changed in sphinx 7.2
            text = text.replace('"Link to this', '"Permalink to this')
            for find, rep in (replace or {}).items():
                text = text.replace(find, rep)
>           file_regression.check(text, extension=regress_ext, encoding="utf8")
E           AssertionError: FILES DIFFER:
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_fieldlist_extension0/test_sphinx_builds/test_fieldlist_extension.html
E           /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_fieldlist_extension0/test_sphinx_builds/test_fieldlist_extension.obtained.html
E           HTML DIFF: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/temp/pytest-of-paludisbuild/pytest-0/test_fieldlist_extension0/test_sphinx_builds/test_fieldlist_extension.obtained.diff.html
E           --- 
E           +++ 
E           @@ -144,6 +144,8 @@
E                 </dd>
E                </dl>
E               </section>
E           +   <div class="clearer">
E           +   </div>
E              </div>
E             </div>
E            </div>

tests/test_sphinx/conftest.py:87: AssertionError
---------------------------------------------------------------------------- Captured stdout teardown -----------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/fieldlist
# outdir: /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/fieldlist/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'fieldlist'}, disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/fieldlist/_build/html/_static/basic.css
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/fieldlist/_build/html/_static/documentation_options.js
Writing evaluated template result to /var/tmp/paludis/build/dev-python-myst-parser-4.0.0/work/PYTHON_ABIS/3.11/MyST-Parser-4.0.0/tests/test_sphinx/sourcedirs/fieldlist/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] index

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in tests/test_sphinx/sourcedirs/fieldlist/_build/html.

# warning: 

============================================================================= short test summary info =============================================================================
FAILED tests/test_sphinx/test_sphinx_builds.py::test_basic - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_references - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_references_singlehtml - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_heading_slug_func - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_includes - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_footnotes - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_commonmark_only - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_substitutions - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_gettext_html - AssertionError: FILES DIFFER:
FAILED tests/test_sphinx/test_sphinx_builds.py::test_fieldlist_extension - AssertionError: FILES DIFFER:
=========================================================== 10 failed, 1069 passed, 11 skipped, 5 deselected in 17.00s ============================================================
chrisjsewell commented 2 weeks ago

this is already fixed

heirecka commented 2 weeks ago

Oops, I thought I git pulled, sorry about the noise

chrisjsewell commented 2 weeks ago

No worries cheers