tests.sphinx.test_sphinx_opengraph moduleΒΆ

Tests for the title hooks that keep the space of a title icon out of og:title.

tests.sphinx.test_sphinx_opengraph.ICON = '<svg version="1.1" class="sd-octicon"><path d="M2 0h12"></path></svg>'ΒΆ

A stand-in for the SVG that sphinx-design renders for an octicon.

tests.sphinx.test_sphinx_opengraph.render(extensions, title)[source]ΒΆ

Run both hooks around the point where sphinxext-opengraph reads the title.

Return type:

tuple[str, str]

Returns:

The title the extension reads, and the title left for the theme.

tests.sphinx.test_sphinx_opengraph.test_extension_reads_the_title_without_the_icon_gap(title, read)[source]ΒΆ

The extension reads the title without the gap, and the theme gets it back.

tests.sphinx.test_sphinx_opengraph.test_title_untouched_without_the_extension()[source]ΒΆ

Without sphinxext-opengraph, no hook changes the title.