2007-01-24 22:24:01 +08:00
|
|
|
from __future__ import generators
|
|
|
|
|
|
|
|
import py
|
2009-08-25 22:15:17 +08:00
|
|
|
from py.__.rest import resthtml
|
2008-08-18 23:08:39 +08:00
|
|
|
from py.__.rest.testing.setup import getdata
|
2007-01-24 22:24:01 +08:00
|
|
|
|
2008-09-21 23:15:28 +08:00
|
|
|
|
2007-01-24 22:24:01 +08:00
|
|
|
def setup_module(mod):
|
2008-09-21 23:15:28 +08:00
|
|
|
py.test.importorskip("docutils")
|
2007-01-24 22:24:01 +08:00
|
|
|
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")
|
2008-08-18 23:08:39 +08:00
|
|
|
mod.datadir = getdata()
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
def test_process_simple():
|
|
|
|
# fallback test: only checks that no exception is raised
|
|
|
|
def rec(p):
|
|
|
|
return p.check(dotfile=0)
|
2008-08-18 23:08:39 +08:00
|
|
|
for x in datadir.visit("*.txt", rec=rec):
|
2009-08-25 22:15:17 +08:00
|
|
|
yield resthtml.process, x
|
2007-01-24 22:24:01 +08:00
|
|
|
|