mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add tests for html_signaturereturn_icon.
This commit is contained in:
1
tests/roots/test-html_signaturereturn_icon/conf.py
Normal file
1
tests/roots/test-html_signaturereturn_icon/conf.py
Normal file
@@ -0,0 +1 @@
|
||||
extensions = ['sphinx.ext.autodoc']
|
4
tests/roots/test-html_signaturereturn_icon/index.rst
Normal file
4
tests/roots/test-html_signaturereturn_icon/index.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
test-html_signaturereturn_icon
|
||||
==============================
|
||||
|
||||
.. py:function:: foo(a: bool, b: int) -> str
|
@@ -1625,3 +1625,20 @@ def test_html_permalink_icon(app):
|
||||
assert ('<h1>The basic Sphinx documentation for testing<a class="headerlink" '
|
||||
'href="#the-basic-sphinx-documentation-for-testing" '
|
||||
'title="Permalink to this headline"><span>[PERMALINK]</span></a></h1>' in content)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon')
|
||||
def test_html_signaturereturn_icon_default(app):
|
||||
app.build()
|
||||
content = (app.outdir / 'index.html').read_text()
|
||||
|
||||
assert ('<span class="sig-return-icon">→</span>' in content)
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='html_signaturereturn_icon',
|
||||
confoverrides={'html_signaturereturn_icon': '<span>RETURN</span>'})
|
||||
def test_html_signaturereturn_icon_custon(app):
|
||||
app.build()
|
||||
content = (app.outdir / 'index.html').read_text()
|
||||
|
||||
assert ('<span class="sig-return-icon"><span>RETURN</span></span>' in content)
|
||||
|
Reference in New Issue
Block a user