def assert_class_equal(left, right, exact=True, obj='<STR_LIT>'):
__tracebackhide__ = True<EOL>def repr_class(x):<EOL><INDENT>if isinstance(x, Index):<EOL><INDENT>return x<EOL><DEDENT>try:<EOL><INDENT>return x.__class__.__name__<EOL><DEDENT>except AttributeError:<EOL><INDENT>return repr(type(x))<EOL><DEDENT><DEDENT>if exact == '<STR_LIT>':<EOL><INDENT>if type(left) != type(right):<EOL><INDENT>types = {type(left).__name__, type(right).__name__}<EOL>if len(types - {'<STR_LIT>', '<STR_LIT>'}):<EOL><INDENT>msg = '<STR_LIT>'.format(obj=obj)<EOL>raise_assert_detail(obj, msg, repr_class(left),<EOL>repr_class(right))<EOL><DEDENT><DEDENT><DEDENT>elif exact:<EOL><INDENT>if type(left) != type(right):<EOL><INDENT>msg = '<STR_LIT>'.format(obj=obj)<EOL>raise_assert_detail(obj, msg, repr_class(left),<EOL>repr_class(right))<EOL><DEDENT><DEDENT>
checks classes are equal.