check for dvipng in test

This commit is contained in:
Damien Elmes 2013-03-16 06:40:03 +09:00
parent 616e731e34
commit 9f5d23319d

View File

@ -20,10 +20,11 @@ def test_latex():
assert "executing latex" in msg assert "executing latex" in msg
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 os.path.exists("/usr/bin/latex") and for cmd in ("latex", "dvipng"):
not os.path.exists("/usr/texbin/latex")): if (not os.path.exists("/usr/bin/"+cmd) and
print "aborting test; latex is not installed" not os.path.exists("/usr/texbin/"+cmd)):
return print "aborting test; %s is not installed" % cmd
return
# fix path # fix path
anki.latex.latexCmd[0] = "latex" anki.latex.latexCmd[0] = "latex"
# check media db should cause latex to be generated # check media db should cause latex to be generated