def assertNotIsInstance(obj, cls, msg=''):
 if isinstance(obj, cls):
  err_msg = '{0}Input must not be type {1}'
  raise AssertionError(err_msg.format(msg, cls))

def assertNotIsInstance ( obj , cls , msg = '' ) : if isinstance ( obj , cls ) : err_msg = '{0}Input must not be type {1}' raise AssertionError ( err_msg . format ( msg , cls ) )
test that obj is not an instance of cls (which can be a class or a tuple of classes .