'Helper for testing that classify_class_attrs finds a bunch of
different kinds of attributes on a given class.'

def _classify_test(self, newstyle):

    if newstyle:
        base = object
    else:
        class base:
            pass
    class A(base, ):
        def s():
            pass
        s = staticmethod(s)
        def c(cls):
            pass
        c = classmethod(c)
        def getp(self):
            pass
        p = property(getp)
        def m(self):
            pass
        def m1(self):
            pass
        datablob = '1'
        dd = _BrokenDataDescriptor()
        md = _BrokenMethodDescriptor()
    attrs = attrs_wo_objs(A)
    self.assertIn(('s', 'static    method', A), attrs, 'missing    static    method')
    self.assertIn(('c', 'class    method', A), attrs, 'missing    class    method')
    self.assertIn(('p', 'property', A), attrs, 'missing    property')
    self.assertIn(('m', 'method', A), attrs, 'missing    plain    method')
    self.assertIn(('m1', 'method', A), attrs, 'missing    plain    method')
    self.assertIn(('datablob', 'data', A), attrs, 'missing    data')
    self.assertIn(('md', 'method', A), attrs, 'missing    method    descriptor')
    self.assertIn(('dd', 'data', A), attrs, 'missing    data    descriptor')
    class B(A, ):
        def m(self):
            pass
    attrs = attrs_wo_objs(B)
    self.assertIn(('s', 'static    method', A), attrs, 'missing    static    method')
    self.assertIn(('c', 'class    method', A), attrs, 'missing    class    method')
    self.assertIn(('p', 'property', A), attrs, 'missing    property')
    self.assertIn(('m', 'method', B), attrs, 'missing    plain    method')
    self.assertIn(('m1', 'method', A), attrs, 'missing    plain    method')
    self.assertIn(('datablob', 'data', A), attrs, 'missing    data')
    self.assertIn(('md', 'method', A), attrs, 'missing    method    descriptor')
    self.assertIn(('dd', 'data', A), attrs, 'missing    data    descriptor')
    class C(A, ):
        def m(self):
            pass
        def c(self):
            pass
    attrs = attrs_wo_objs(C)
    self.assertIn(('s', 'static    method', A), attrs, 'missing    static    method')
    self.assertIn(('c', 'method', C), attrs, 'missing    plain    method')
    self.assertIn(('p', 'property', A), attrs, 'missing    property')
    self.assertIn(('m', 'method', C), attrs, 'missing    plain    method')
    self.assertIn(('m1', 'method', A), attrs, 'missing    plain    method')
    self.assertIn(('datablob', 'data', A), attrs, 'missing    data')
    self.assertIn(('md', 'method', A), attrs, 'missing    method    descriptor')
    self.assertIn(('dd', 'data', A), attrs, 'missing    data    descriptor')
    class D(B, C, ):
        def m1(self):
            pass
    attrs = attrs_wo_objs(D)
    self.assertIn(('s', 'static    method', A), attrs, 'missing    static    method')
    if newstyle:
        self.assertIn(('c', 'method', C), attrs, 'missing    plain    method')
    else:
        self.assertIn(('c', 'class    method', A), attrs, 'missing    class    method')
    self.assertIn(('p', 'property', A), attrs, 'missing    property')
    self.assertIn(('m', 'method', B), attrs, 'missing    plain    method')
    self.assertIn(('m1', 'method', D), attrs, 'missing    plain    method')
    self.assertIn(('datablob', 'data', A), attrs, 'missing    data')
    self.assertIn(('md', 'method', A), attrs, 'missing    method    descriptor')
    self.assertIn(('dd', 'data', A), attrs, 'missing    data    descriptor')
