mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix EM10{1,2} (exception must not use a string)
This commit is contained in:
@@ -29,9 +29,11 @@ def has_binary(binary):
|
||||
def test_imgmath_png(app, status, warning):
|
||||
app.builder.build_all()
|
||||
if "LaTeX command 'latex' cannot be run" in warning.getvalue():
|
||||
raise pytest.skip.Exception('LaTeX command "latex" is not available')
|
||||
msg = 'LaTeX command "latex" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
if "dvipng command 'dvipng' cannot be run" in warning.getvalue():
|
||||
raise pytest.skip.Exception('dvipng command "dvipng" is not available')
|
||||
msg = 'dvipng command "dvipng" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf8')
|
||||
shutil.rmtree(app.outdir)
|
||||
@@ -48,9 +50,11 @@ def test_imgmath_png(app, status, warning):
|
||||
def test_imgmath_svg(app, status, warning):
|
||||
app.builder.build_all()
|
||||
if "LaTeX command 'latex' cannot be run" in warning.getvalue():
|
||||
raise pytest.skip.Exception('LaTeX command "latex" is not available')
|
||||
msg = 'LaTeX command "latex" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
if "dvisvgm command 'dvisvgm' cannot be run" in warning.getvalue():
|
||||
raise pytest.skip.Exception('dvisvgm command "dvisvgm" is not available')
|
||||
msg = 'dvisvgm command "dvisvgm" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf8')
|
||||
shutil.rmtree(app.outdir)
|
||||
@@ -68,9 +72,11 @@ def test_imgmath_svg(app, status, warning):
|
||||
def test_imgmath_svg_embed(app, status, warning):
|
||||
app.builder.build_all()
|
||||
if "LaTeX command 'latex' cannot be run" in warning.getvalue():
|
||||
pytest.skip('LaTeX command "latex" is not available')
|
||||
msg = 'LaTeX command "latex" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
if "dvisvgm command 'dvisvgm' cannot be run" in warning.getvalue():
|
||||
pytest.skip('dvisvgm command "dvisvgm" is not available')
|
||||
msg = 'dvisvgm command "dvisvgm" is not available'
|
||||
raise pytest.skip.Exception(msg)
|
||||
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf8')
|
||||
shutil.rmtree(app.outdir)
|
||||
|
||||
Reference in New Issue
Block a user