def importorskip(modname, minversion=None):
 try:
  pytest.importorskip(modname, minversion)
 except Skipped as exc:
  return skip(str(exc))
 except Exception as exc:
  print 'importorskip: Exception in module "{}":'.format(modname)
  print ('-' * 60)
  traceback.print_exc(file=sys.stdout)
  print ('-' * 60)
  return skip(str(exc))
 else:
  return _noop

def importorskip ( modname , minversion = None ) : try : pytest . importorskip ( modname , minversion ) except Skipped as exc : return skip ( str ( exc ) ) except Exception as exc : print 'importorskip: Exception in module "{}":' . format ( modname ) print ( '-' * 60 ) traceback . print_exc ( file = sys . stdout ) print ( '-' * 60 ) return skip ( str ( exc ) ) else : return _noop
return imported module if it has at least "minversion" as its __version__ attribute .