diff --git a/py/rest/testing/test_convert.py b/py/rest/testing/test_convert.py index c450414e3..cd3fa5179 100644 --- a/py/rest/testing/test_convert.py +++ b/py/rest/testing/test_convert.py @@ -4,10 +4,10 @@ from py.__.rest.convert import convert_dot, latexformula2png datadir = py.magic.autopath().dirpath().join("data") def setup_module(mod): - if not py.path.local.sysfind("gs") or \ - not py.path.local.sysfind("dot") or \ - not py.path.local.sysfind("latex"): - py.test.skip("ghostscript, graphviz and latex needed") + required = 'gs', 'dot', 'latex', 'epstopdf', + for exe in required: + if not py.path.local.sysfind(exe): + py.test.skip("%r not found, required: %r" %(exe, required)) def test_convert_dot(): # XXX not really clear that the result is valid pdf/eps diff --git a/py/rest/testing/test_directive.py b/py/rest/testing/test_directive.py index 63b02f0b5..87f76adc3 100644 --- a/py/rest/testing/test_directive.py +++ b/py/rest/testing/test_directive.py @@ -30,8 +30,9 @@ class TestGraphviz(object): png.remove() def _graphviz_pdf(self): - if not py.path.local.sysfind("dot") or not py.path.local.sysfind("latex"): - py.test.skip("graphviz and latex needed") + for exe in 'dot latex epstopdf'.split(): + if not py.path.local.sysfind(exe): + py.test.skip("%r needed" %(exe,)) directive.set_backend_and_register_directives("latex") txt = py.path.local(datadir.join("graphviz.txt"))