[svn r58308] * de-generalize conditional skips and only care
nicely for common tedious causes of skipping: import a module and checking it has a certain version. usage example: docutils = py.test.importorskip(docutils, minversion="0.4") * used new helper and cleanup skipping logic in py lib --HG-- branch : trunk
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
import py
|
||||
try:
|
||||
import docutils
|
||||
except ImportError:
|
||||
py.test.skip("docutils not present")
|
||||
|
||||
from py.__.rest.testing.setup import getdata
|
||||
docutils = py.test.importorskip("docutils")
|
||||
from py.__.rest import directive
|
||||
from py.__.misc import rest
|
||||
from py.__.rest.latex import process_rest_file
|
||||
from py.__.rest.testing.setup import getdata
|
||||
|
||||
def setup_module(mod):
|
||||
mod.datadir = getdata()
|
||||
|
||||
Reference in New Issue
Block a user