mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
diet test-root: Remove html_static_path and html_extra_path (duplicated with test-html_assets)
This commit is contained in:
parent
a8ab1f164b
commit
a5b64c98af
@ -1 +0,0 @@
|
||||
This whole directory is there to test html_static_path.
|
@ -1 +0,0 @@
|
||||
/* This file should be excluded from being copied over */
|
@ -1 +0,0 @@
|
||||
/* Stub file */
|
@ -33,8 +33,6 @@ html_sidebars = {'**': 'customsb.html',
|
||||
'contents': ['contentssb.html', 'localtoc.html',
|
||||
'globaltoc.html']}
|
||||
html_style = 'default.css'
|
||||
html_static_path = ['_static', 'templated.css_t']
|
||||
html_extra_path = ['robots.txt']
|
||||
html_last_updated_fmt = '%b %d, %Y'
|
||||
html_context = {'hckey': 'hcval', 'hckey_co': 'wrong_hcval_co'}
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
User-agent: *
|
||||
Disallow: /cgi-bin/
|
@ -1,2 +0,0 @@
|
||||
/* Stub file, templated */
|
||||
{{ sphinx_version }}
|
@ -126,24 +126,6 @@ def check_xpath(etree, fname, path, check, be_found=True):
|
||||
[node.text for node in nodes]))
|
||||
|
||||
|
||||
def check_static_entries(outdir):
|
||||
staticdir = outdir / '_static'
|
||||
assert staticdir.isdir()
|
||||
# a file from a directory entry in html_static_path
|
||||
assert (staticdir / 'README').isfile()
|
||||
# a directory from a directory entry in html_static_path
|
||||
assert (staticdir / 'subdir' / 'foo.css').isfile()
|
||||
# a file from a file entry in html_static_path
|
||||
assert (staticdir / 'templated.css').isfile()
|
||||
assert (staticdir / 'templated.css').text().splitlines()[1] == __display_version__
|
||||
# a file from _static, but matches exclude_patterns
|
||||
assert not (staticdir / 'excluded.css').exists()
|
||||
|
||||
|
||||
def check_extra_entries(outdir):
|
||||
assert (outdir / 'robots.txt').isfile()
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='warnings')
|
||||
def test_html_warnings(app, warning):
|
||||
app.build()
|
||||
@ -156,15 +138,6 @@ def test_html_warnings(app, warning):
|
||||
'--- Got:\n' + html_warnings
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', tags=['testtag'], confoverrides={
|
||||
'html_context.hckey_co': 'hcval_co'})
|
||||
@pytest.mark.test_params(shared_result='test_build_html_output')
|
||||
def test_static_output(app):
|
||||
app.build()
|
||||
check_static_entries(app.builder.outdir)
|
||||
check_extra_entries(app.builder.outdir)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("fname,expect", flat_dict({
|
||||
'images.html': [
|
||||
(".//img[@src='_images/img.png']", ''),
|
||||
|
Loading…
Reference in New Issue
Block a user