def _get_skip_method(obj):
 if inspect.isclass(obj):
  if (not _is_test_cls(obj)):
   raise ValueError(NOT_TEST_OBJECT_ERROR_MSG)
  return _mark_class_skipped
 else:
  if (not _is_test_method_name(obj.__name__)):
   raise ValueError(NOT_TEST_OBJECT_ERROR_MSG)
  return _mark_method_skipped

def _get_skip_method ( obj ) : if inspect . isclass ( obj ) : if ( not _is_test_cls ( obj ) ) : raise ValueError ( NOT_TEST_OBJECT_ERROR_MSG ) return _mark_class_skipped else : if ( not _is_test_method_name ( obj . __name__ ) ) : raise ValueError ( NOT_TEST_OBJECT_ERROR_MSG ) return _mark_method_skipped
make sure that we can decorate both methods and classes .