From 7dca0d02a9ffa3047b3fbe011ed9b8513214ddfa Mon Sep 17 00:00:00 2001 From: hpk Date: Sat, 16 Aug 2008 17:29:35 +0200 Subject: [PATCH] [svn r57322] port 57306 from branch: check for actually needed binaries --HG-- branch : trunk --- py/rest/testing/test_convert.py | 8 ++++---- py/rest/testing/test_directive.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) 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"))