def test_super_class_multiple(self): class A: pass class B: pass class C(A, B): pass assert super_class(C) == A assert super_class(A) == object assert super_class(B) == object
def test_super_class_multiple(self): class A: pass class B: pass class C(A, B): pass assert super_class(C) == A assert super_class(A) == object assert super_class(B) == object
def ordered_field_names(cls): """The ordered list of field names. This is a metamethod which should be called on cls. Returns: An tuple containing the field names in order. """ if cls is Header: return cls._ordered_field_names return super_class(cls).ordered_field_names() + cls._ordered_field_names
def ordered_field_names(cls): """The ordered list of field names. This is a metamethod which should be called on cls. Returns: An tuple containing the field names in order. """ if cls is Header: return cls._ordered_field_names return super_class(cls).ordered_field_names() + cls._ordered_field_names
def test_super_class_single(self): assert super_class(object) == object
def test_super_class_single(self): assert super_class(object) == object