[svn r57322] port 57306 from branch: check for actually needed binaries
--HG-- branch : trunk
This commit is contained in:
parent
abc8cf09aa
commit
7dca0d02a9
|
@ -4,10 +4,10 @@ from py.__.rest.convert import convert_dot, latexformula2png
|
||||||
datadir = py.magic.autopath().dirpath().join("data")
|
datadir = py.magic.autopath().dirpath().join("data")
|
||||||
|
|
||||||
def setup_module(mod):
|
def setup_module(mod):
|
||||||
if not py.path.local.sysfind("gs") or \
|
required = 'gs', 'dot', 'latex', 'epstopdf',
|
||||||
not py.path.local.sysfind("dot") or \
|
for exe in required:
|
||||||
not py.path.local.sysfind("latex"):
|
if not py.path.local.sysfind(exe):
|
||||||
py.test.skip("ghostscript, graphviz and latex needed")
|
py.test.skip("%r not found, required: %r" %(exe, required))
|
||||||
|
|
||||||
def test_convert_dot():
|
def test_convert_dot():
|
||||||
# XXX not really clear that the result is valid pdf/eps
|
# XXX not really clear that the result is valid pdf/eps
|
||||||
|
|
|
@ -30,8 +30,9 @@ class TestGraphviz(object):
|
||||||
png.remove()
|
png.remove()
|
||||||
|
|
||||||
def _graphviz_pdf(self):
|
def _graphviz_pdf(self):
|
||||||
if not py.path.local.sysfind("dot") or not py.path.local.sysfind("latex"):
|
for exe in 'dot latex epstopdf'.split():
|
||||||
py.test.skip("graphviz and latex needed")
|
if not py.path.local.sysfind(exe):
|
||||||
|
py.test.skip("%r needed" %(exe,))
|
||||||
|
|
||||||
directive.set_backend_and_register_directives("latex")
|
directive.set_backend_and_register_directives("latex")
|
||||||
txt = py.path.local(datadir.join("graphviz.txt"))
|
txt = py.path.local(datadir.join("graphviz.txt"))
|
||||||
|
|
Loading…
Reference in New Issue