From 9f5d23319ddee801fb31d0bbc73e44341f33f542 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 16 Mar 2013 06:40:03 +0900 Subject: [PATCH] check for dvipng in test --- tests/test_latex.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_latex.py b/tests/test_latex.py index 40c4c40e0..4b7fc83af 100644 --- a/tests/test_latex.py +++ b/tests/test_latex.py @@ -20,10 +20,11 @@ def test_latex(): assert "executing latex" in msg assert "installed" in msg # check if we have latex installed, and abort test if we don't - if (not os.path.exists("/usr/bin/latex") and - not os.path.exists("/usr/texbin/latex")): - print "aborting test; latex is not installed" - return + for cmd in ("latex", "dvipng"): + if (not os.path.exists("/usr/bin/"+cmd) and + not os.path.exists("/usr/texbin/"+cmd)): + print "aborting test; %s is not installed" % cmd + return # fix path anki.latex.latexCmd[0] = "latex" # check media db should cause latex to be generated