mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Combine tests for autosectionlabel
This commit is contained in:
@@ -35,12 +35,7 @@ def test_autosectionlabel_html(app, status, warning):
|
|||||||
'<span class="std std-ref">For UNIX users</span></a></li>')
|
'<span class="std std-ref">For UNIX users</span></a></li>')
|
||||||
assert re.search(html, content, re.S)
|
assert re.search(html, content, re.S)
|
||||||
|
|
||||||
|
# for smart_quotes (refs: #4027)
|
||||||
@pytest.mark.sphinx('html', testroot='ext-autosectionlabel')
|
|
||||||
def test_autosectionlabel_html_apostrophe(app, status, warning):
|
|
||||||
app.builder.build_all()
|
|
||||||
|
|
||||||
content = (app.outdir / 'index.html').text()
|
|
||||||
html = (u'<li><a class="reference internal" '
|
html = (u'<li><a class="reference internal" '
|
||||||
u'href="#this-one-s-got-an-apostrophe">'
|
u'href="#this-one-s-got-an-apostrophe">'
|
||||||
u'<span class="std std-ref">This one’s got an apostrophe'
|
u'<span class="std std-ref">This one’s got an apostrophe'
|
||||||
@@ -52,9 +47,3 @@ def test_autosectionlabel_html_apostrophe(app, status, warning):
|
|||||||
@pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document')
|
@pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document')
|
||||||
def test_autosectionlabel_prefix_document_html(app, status, warning):
|
def test_autosectionlabel_prefix_document_html(app, status, warning):
|
||||||
return test_autosectionlabel_html(app, status, warning)
|
return test_autosectionlabel_html(app, status, warning)
|
||||||
|
|
||||||
|
|
||||||
# Re-use test definition from above, just change the test root directory
|
|
||||||
@pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document')
|
|
||||||
def test_autosectionlabel_prefix_document_html_apostrophe(app, status, warning):
|
|
||||||
return test_autosectionlabel_html_apostrophe(app, status, warning)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user