def __new__(cls, name, bases, attrs):
        for base in bases:
            for base_name in dir(base):
                base_value = getattr(base, base_name)

                if not callable(base_value) or \
                   not base_name.startswith('assert'):
                    continue

                if not base_name in attrs:
                    attrs.update({base_name: base_value})

        for attr_name, attr_value in attrs.items():
            if not attr_name.startswith('assert') or attr_name == 'assert_':
                continue

            if attr_name[6] == '_':
                new_name = underscore_to_camelcase(attr_name)
            else:
                new_name = camelcase_to_underscore(attr_name)

            if not new_name in attrs:
                attrs[new_name] = attr_value

        for attr in tools.__all__:
            attrs.update({attr: getattr(tools, attr)})
            attrs[attr] = staticmethod(attrs[attr])

        if datadiff_assert_equal:
            key = attrs.get('use_datadiff', False) and 'assert_equal' \
                                                   or 'datadiff_assert_equal'

            attrs.update({key: datadiff_assert_equal})
            attrs[key] = staticmethod(attrs[key])
        elif attrs.get('use_datadiff', False):
            warnings.warn('You enabled ``datadiff.tools.assert_equal``, but ' \
                          'looks like you have not ``datadiff`` library ' \
                          'installed in your system.')

        return type.__new__(cls, name, bases, attrs)
dataset/ETHPy150Open playpauseandstop/tddspry/tddspry/cases.py/BaseTestCaseMetaclass.__new__/original