mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
fix latex test
This commit is contained in:
parent
cc4b9938c7
commit
e5ed110d65
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ def test_latex():
|
|||
d = getEmptyDeck()
|
||||
# change latex cmd to simulate broken build
|
||||
import anki.latex
|
||||
anki.latex.latexCmd[0] = "nolatex"
|
||||
anki.latex.latexCmds[0][0] = "nolatex"
|
||||
# add a note with latex
|
||||
f = d.newNote()
|
||||
f['Front'] = u"[latex]hello[/latex]"
|
||||
|
@ -17,7 +17,7 @@ def test_latex():
|
|||
assert len(os.listdir(d.media.dir())) == 0
|
||||
# check the error message
|
||||
msg = f.cards()[0].q()
|
||||
assert "executing latex" in msg
|
||||
assert "executing nolatex" in msg
|
||||
assert "installed" in msg
|
||||
# check if we have latex installed, and abort test if we don't
|
||||
for cmd in ("latex", "dvipng"):
|
||||
|
@ -26,7 +26,7 @@ def test_latex():
|
|||
print "aborting test; %s is not installed" % cmd
|
||||
return
|
||||
# fix path
|
||||
anki.latex.latexCmd[0] = "latex"
|
||||
anki.latex.latexCmds[0][0] = "latex"
|
||||
# check media db should cause latex to be generated
|
||||
d.media.check()
|
||||
assert len(os.listdir(d.media.dir())) == 1
|
||||
|
|
Loading…
Reference in a new issue