summaryrefslogtreecommitdiff
path: root/tests/test_ext_math.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-07-15 00:51:29 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-07-15 00:51:29 +0900
commita692009808ad24e469b106cafed930d0e522cfb2 (patch)
treef86a082c0f15c759d972c3b551496385e0291272 /tests/test_ext_math.py
parent1dd249dd8dc7c3428d022f9bdac4097c18708084 (diff)
parent736615c18c56f91beb7525f97ed8dabacc215ec4 (diff)
downloadsphinx-git-a692009808ad24e469b106cafed930d0e522cfb2.tar.gz
Merge branch 'stable'
Diffstat (limited to 'tests/test_ext_math.py')
-rw-r--r--tests/test_ext_math.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py
index 4b168b40c..a73d2a26e 100644
--- a/tests/test_ext_math.py
+++ b/tests/test_ext_math.py
@@ -14,7 +14,24 @@ import re
from util import with_app, SkipTest
-@with_app('html', testroot='ext-math',
+@with_app(buildername='html', testroot='ext-math',
+ confoverrides = {'extensions': ['sphinx.ext.jsmath'], 'jsmath_path': 'dummy.js'})
+def test_jsmath(app, status, warning):
+ app.builder.build_all()
+ content = (app.outdir / 'math.html').text()
+
+ assert '<div class="math">\na^2 + b^2 = c^2</div>' in content
+ assert '<div class="math">\n\\begin{split}a + 1 &lt; b\\end{split}</div>' in content
+ assert (u'<span class="eqno">(1)<a class="headerlink" href="#equation-foo" '
+ u'title="Permalink to this code">\xb6</a></span>'
+ u'<div class="math" id="equation-foo">\ne^{i\\pi} = 1</div>' in content)
+ assert ('<span class="eqno">(2)</span><div class="math">\n'
+ 'e^{ix} = \\cos x + i\\sin x</div>' in content)
+ assert '<div class="math">\nn \\in \\mathbb N</div>' in content
+ assert '<div class="math">\na + 1 &lt; b</div>' in content
+
+
+@with_app('html', testroot='ext-math-simple',
confoverrides = {'extensions': ['sphinx.ext.imgmath']})
def test_imgmath_png(app, status, warning):
app.builder.build_all()
@@ -29,7 +46,7 @@ def test_imgmath_png(app, status, warning):
assert re.search(html, content, re.S)
-@with_app('html', testroot='ext-math',
+@with_app('html', testroot='ext-math-simple',
confoverrides={'extensions': ['sphinx.ext.imgmath'],
'imgmath_image_format': 'svg'})
def test_imgmath_svg(app, status, warning):