fix latex tests

This commit is contained in:
Damien Elmes 2017-08-01 14:25:49 +10:00
parent a5997e400b
commit 83c96770c8

View file

@ -11,7 +11,7 @@ def test_latex():
d = getEmptyCol() d = getEmptyCol()
# change latex cmd to simulate broken build # change latex cmd to simulate broken build
import anki.latex import anki.latex
anki.latex.latexCmds[0][0] = "nolatex" anki.latex.pngCommands[0][0] = "nolatex"
# add a note with latex # add a note with latex
f = d.newNote() f = d.newNote()
f['Front'] = "[latex]hello[/latex]" f['Front'] = "[latex]hello[/latex]"
@ -27,7 +27,7 @@ def test_latex():
print("aborting test; latex or dvipng is not installed") print("aborting test; latex or dvipng is not installed")
return return
# fix path # fix path
anki.latex.latexCmds[0][0] = "latex" anki.latex.pngCommands[0][0] = "latex"
# check media db should cause latex to be generated # check media db should cause latex to be generated
d.media.check() d.media.check()
assert len(os.listdir(d.media.dir())) == 1 assert len(os.listdir(d.media.dir())) == 1