Sphinx-Gallery 0.12 kills AppVeyor tests · Issue #25416 · matplotlib/matplotlib · GitHub
Skip to content

Sphinx-Gallery 0.12 kills AppVeyor tests #25416

Description

@oscargus

Summary

================================== FAILURES ===================================
_____________________ test_sphinx_gallery_example_header ______________________
[gw1] win32 -- Python 3.9.16 C:\Miniconda3-x64\envs\mpl-dev\python.exe
    def test_sphinx_gallery_example_header():
        """
        We have copied EXAMPLE_HEADER and modified it to include meta keywords.
        This test monitors that the version we have copied is still the same as
        the EXAMPLE_HEADER in sphinx-gallery. If sphinx-gallery changes its
        EXAMPLE_HEADER, this test will start to fail. In that case, please update
        the monkey-patching of EXAMPLE_HEADER in conf.py.
        """
        gen_rst = pytest.importorskip('sphinx_gallery.gen_rst')
    
        EXAMPLE_HEADER = """
    .. DO NOT EDIT.
    .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
    .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
    .. "{0}"
    .. LINE NUMBERS ARE GIVEN BELOW.
    
    .. only:: html
    
        .. note::
            :class: sphx-glr-download-link-note
    
            Click :ref:`here <sphx_glr_download_{1}>`
            to download the full example code{2}
    
    .. rst-class:: sphx-glr-example-title
    
    .. _sphx_glr_{1}:
    
    """
>       assert gen_rst.EXAMPLE_HEADER == EXAMPLE_HEADER
E       AssertionError: assert '\n.. DO NOT ..._glr_{1}:\n\n' == '\n.. DO NOT ..._glr_{1}:\n\n'
E         Skipping 242 identical leading characters in diff, use -v to show
E           
E           
E         -         Click :ref:`here <sphx_glr_download_{1}>`
E         ?        ------         ^
E         +         :ref:`Go to the end <sphx_glr_download_{1}>`
E         ?               +++++++  ^ ++
E                   to download the full example code{2}
E           
E           .. rst-class:: sphx-glr-example-title
E           
E           .. _sphx_glr_{1}:
lib\matplotlib\tests\test_doc.py:34: AssertionError

Proposed fix

Seems like sphinx-gallery have changed their example header in 0.12.

Maybe it is worth adding downloading sphinx-gallery dev version to the nightlies as well?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions