diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-03 19:53:12 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-02-03 19:53:12 +0900 |
| commit | c70dfcd39007dd6d53d5dc3b686b4c6dcef623dd (patch) | |
| tree | 0998e4b41002cc24b19404e8823e5366224abac5 /tests | |
| parent | 705248af2fc063b71ba7a5edf9887d45db915f21 (diff) | |
| parent | ed3d13b9395a2df4914d460f40af65c9dfa57b7f (diff) | |
| download | sphinx-git-c70dfcd39007dd6d53d5dc3b686b4c6dcef623dd.tar.gz | |
Merge branch '1.8'
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/roots/test-html_style/_static/default.css | 0 | ||||
| -rw-r--r-- | tests/roots/test-html_style/conf.py | 2 | ||||
| -rw-r--r-- | tests/roots/test-html_style/index.rst | 2 | ||||
| -rw-r--r-- | tests/roots/test-root/conf.py | 1 | ||||
| -rw-r--r-- | tests/test_build_html.py | 9 |
5 files changed, 13 insertions, 1 deletions
diff --git a/tests/roots/test-html_style/_static/default.css b/tests/roots/test-html_style/_static/default.css new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/roots/test-html_style/_static/default.css diff --git a/tests/roots/test-html_style/conf.py b/tests/roots/test-html_style/conf.py new file mode 100644 index 000000000..df1b3103c --- /dev/null +++ b/tests/roots/test-html_style/conf.py @@ -0,0 +1,2 @@ +html_style = 'default.css' +html_static_path = ['_static'] diff --git a/tests/roots/test-html_style/index.rst b/tests/roots/test-html_style/index.rst new file mode 100644 index 000000000..d8aef481c --- /dev/null +++ b/tests/roots/test-html_style/index.rst @@ -0,0 +1,2 @@ +html_style +========== diff --git a/tests/roots/test-root/conf.py b/tests/roots/test-root/conf.py index a8e317304..36130dae9 100644 --- a/tests/roots/test-root/conf.py +++ b/tests/roots/test-root/conf.py @@ -37,7 +37,6 @@ rst_epilog = '.. |subst| replace:: global substitution' html_sidebars = {'**': ['localtoc.html', 'relations.html', 'sourcelink.html', 'customsb.html', 'searchbox.html'], 'index': ['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'} diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 70fc2e32b..c600dd7de 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1252,6 +1252,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 / 'index.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() |
