def test_with_binding_descriptor(self): cls = type(mocks.ClassWithDescriptor(mocks.Binding( mocks.Descriptor()))) result = _find_descriptor(cls, attrname) self.assertIs(result, cls.__dict__[attrname])
def test_with_superclass(self): result = _find_descriptor(SubClass, Class.attrname) self.assertIs(result, Class.__dict__[Class.attrname])
def test_with_binding_descriptor(self): cls = type(mocks.ClassWithDescriptor(mocks.Binding(mocks.Descriptor()))) result = _find_descriptor(cls, attrname) self.assertIs(result, cls.__dict__[attrname])