Skip to content

Commit

Permalink
Separate testcase for html_style to single case from root
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Feb 3, 2019
1 parent 6b3244d commit 97782c8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Empty file.
2 changes: 2 additions & 0 deletions tests/roots/test-html_style/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
html_style = 'default.css'
html_static_path = ['_static']
2 changes: 2 additions & 0 deletions tests/roots/test-html_style/contents.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
html_style
==========
1 change: 0 additions & 1 deletion tests/roots/test-root/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
'customsb.html', 'searchbox.html'],
'contents': ['contentssb.html', 'localtoc.html',
'globaltoc.html']}
html_style = 'default.css'
html_last_updated_fmt = '%b %d, %Y'
html_context = {'hckey': 'hcval', 'hckey_co': 'wrong_hcval_co'}

Expand Down
9 changes: 9 additions & 0 deletions tests/test_build_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,15 @@ def test_alternate_stylesheets(app, cached_etree_parse, fname, expect):
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)


@pytest.mark.sphinx('html', testroot='html_style')
def test_html_style(app, status, warning):
app.build()
result = (app.outdir / 'contents.html').text()
assert '<link rel="stylesheet" href="_static/default.css" type="text/css" />' in result
assert ('<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />'
not in result)


@pytest.mark.sphinx('html', testroot='images')
def test_html_remote_images(app, status, warning):
app.builder.build_all()
Expand Down

0 comments on commit 97782c8

Please sign in to comment.