def _possibly_unimplemented(cls, require=True):
 if require:
  return cls
 else:
  def wrap(fc):
   def wrapper(*a, **kw):
    try:
     return fc(*a, **kw)
    except (NotImplementedError, TypeError, ValueError, IndexError, AttributeError):
     raise nose.SkipTest('feature not implemented')
   wrapper.__name__ = fc.__name__
   return wrapper
  new_dict = dict(cls.__dict__)
  for (name, func) in cls.__dict__.items():
   if name.startswith('test_'):
    new_dict[name] = wrap(func)
  return type((cls.__name__ + 'NotImplemented'), cls.__bases__, new_dict)

def _possibly_unimplemented ( cls , require = True ) : if require : return cls else : def wrap ( fc ) : def wrapper ( * a , ** kw ) : try : return fc ( * a , ** kw ) except ( NotImplementedError , TypeError , ValueError , IndexError , AttributeError ) : raise nose . SkipTest ( 'feature not implemented' ) wrapper . __name__ = fc . __name__ return wrapper new_dict = dict ( cls . __dict__ ) for ( name , func ) in cls . __dict__ . items ( ) : if name . startswith ( 'test_' ) : new_dict [ name ] = wrap ( func ) return type ( ( cls . __name__ + 'NotImplemented' ) , cls . __bases__ , new_dict )
construct a class that either runs tests as usual .