mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Refactor test_build_html: Use basic project instead roots
This commit is contained in:
parent
a5b64c98af
commit
a3f04c3397
@ -1114,16 +1114,22 @@ def test_html_assets(app):
|
|||||||
assert not (app.outdir / 'subdir' / '.htpasswd').exists()
|
assert not (app.outdir / 'subdir' / '.htpasswd').exists()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('html', confoverrides={'html_sourcelink_suffix': ''})
|
@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.txt'})
|
||||||
def test_html_sourcelink_suffix(app):
|
def test_html_sourcelink_suffix(app):
|
||||||
app.builder.build_all()
|
app.builder.build_all()
|
||||||
content_otherext = (app.outdir / 'otherext.html').text()
|
assert (app.outdir / '_sources' / 'index.rst.txt').exists()
|
||||||
content_images = (app.outdir / 'images.html').text()
|
|
||||||
|
|
||||||
assert '<a href="_sources/otherext.foo"' in content_otherext
|
|
||||||
assert '<a href="_sources/images.txt"' in content_images
|
@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': '.rst'})
|
||||||
assert (app.outdir / '_sources' / 'otherext.foo').exists()
|
def test_html_sourcelink_suffix_same(app):
|
||||||
assert (app.outdir / '_sources' / 'images.txt').exists()
|
app.builder.build_all()
|
||||||
|
assert (app.outdir / '_sources' / 'index.rst').exists()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.sphinx('html', testroot='basic', confoverrides={'html_sourcelink_suffix': ''})
|
||||||
|
def test_html_sourcelink_suffix_empty(app):
|
||||||
|
app.builder.build_all()
|
||||||
|
assert (app.outdir / '_sources' / 'index.rst').exists()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('html', testroot='html_entity')
|
@pytest.mark.sphinx('html', testroot='html_entity')
|
||||||
|
Loading…
Reference in New Issue
Block a user