def require_map_reduce(conn):
 try:
  import spidermonkey
 except BaseException:
  try:
   from ming import mim
   if (hasattr(conn, 'conn') and isinstance(conn.conn, mim.Connection)):
    import testtools
    raise testtools.testcase.TestSkipped('requires spidermonkey')
  except ImportError:
   import testtools
   raise testtools.testcase.TestSkipped('requires mim')

def require_map_reduce ( conn ) : try : import spidermonkey except BaseException : try : from ming import mim if ( hasattr ( conn , 'conn' ) and isinstance ( conn . conn , mim . Connection ) ) : import testtools raise testtools . testcase . TestSkipped ( 'requires spidermonkey' ) except ImportError : import testtools raise testtools . testcase . TestSkipped ( 'requires mim' )
raises skiptest if the connection is using mim .