summaryrefslogtreecommitdiff
path: root/tests/test_build_html.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-25 21:36:30 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-09-25 21:36:30 +0100
commitf01d50d695bf55f1af34b87c4e6c84f76dd9a36d (patch)
treee98dc537312410d5661ae76c72306d3a8d2a8e49 /tests/test_build_html.py
parent7ad0fcf22dbff5ee80a644e46429ff2ec3f25980 (diff)
parenteb5b3aa25dbc918c8250a2336aaaf2b753ad36b5 (diff)
downloadsphinx-git-f01d50d695bf55f1af34b87c4e6c84f76dd9a36d.tar.gz
Merge branch '5.x'
# Conflicts: # CHANGES # doc/conf.py # sphinx/__init__.py # sphinx/builders/html/__init__.py # sphinx/domains/python.py # tests/test_build_html.py
Diffstat (limited to 'tests/test_build_html.py')
-rw-r--r--tests/test_build_html.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index f443bdf4d..072f187ba 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -131,6 +131,16 @@ def test_html4_output(app, status, warning):
app.build()
+def test_html4_deprecation(make_app, tempdir):
+ (tempdir / 'conf.py').write_text('', encoding='utf-8')
+ app = make_app(
+ buildername='html',
+ srcdir=tempdir,
+ confoverrides={'html4_writer': True},
+ )
+ assert 'HTML 4 output is deprecated and will be removed' in app._warning.getvalue()
+
+
@pytest.mark.parametrize("fname,expect", flat_dict({
'images.html': [
(".//img[@src='_images/img.png']", ''),
@@ -1222,7 +1232,8 @@ def test_assets_order(app):
# js_files
expected = ['_static/early.js',
- '_static/doctools.js', 'https://example.com/script.js', '_static/normal.js',
+ '_static/doctools.js', '_static/sphinx_highlight.js',
+ 'https://example.com/script.js', '_static/normal.js',
'_static/late.js', '_static/js/custom.js', '_static/lazy.js']
pattern = '.*'.join('src="%s"' % f for f in expected)
assert re.search(pattern, content, re.S)