diff options
Diffstat (limited to 'tests/test_ext_math.py')
-rw-r--r-- | tests/test_ext_math.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py index ebe2c0f38..52d49ec43 100644 --- a/tests/test_ext_math.py +++ b/tests/test_ext_math.py @@ -256,3 +256,16 @@ def test_mathjax_is_not_installed_if_no_equations(app, status, warning): content = (app.outdir / 'index.html').read_text() assert 'MathJax.js' not in content + + +@pytest.mark.sphinx('html', testroot='ext-math', + confoverrides={'extensions': ['sphinx.ext.mathjax']}) +def test_mathjax_is_installed_if_no_equations_when_forced(app, status, warning): + app.add_html_assets_in_all_pages() + app.builder.build_all() + + content = (app.outdir / 'index.html').read_text() + assert MATHJAX_URL in content + + content = (app.outdir / 'nomath.html').read_text() + assert MATHJAX_URL in content |