fix latex check

This commit is contained in:
Damien Elmes 2016-07-04 17:07:48 +10:00
parent 1cebe4ee48
commit 85665bc18d

View file

@ -24,7 +24,7 @@ def test_latex():
assert "installed" in msg assert "installed" in msg
# check if we have latex installed, and abort test if we don't # check if we have latex installed, and abort test if we don't
if not shutil.which("latex") or not shutil.which("dvipng"): if not shutil.which("latex") or not shutil.which("dvipng"):
print("aborting test; %s is not installed" % cmd) print("aborting test; latex or dvipng is not installed")
return return
# fix path # fix path
anki.latex.latexCmds[0][0] = "latex" anki.latex.latexCmds[0][0] = "latex"
@ -111,4 +111,4 @@ def _test_includes_bad_command(bad):
f['Front'] = '[latex]%s[/latex]' % bad; f['Front'] = '[latex]%s[/latex]' % bad;
d.addNote(f) d.addNote(f)
q = f.cards()[0].q() q = f.cards()[0].q()
return ("'%s' is not allowed on cards" % bad in q, "Card content: %s" % q) return ("'%s' is not allowed on cards" % bad in q, "Card content: %s" % q)