def test_with_binding_descriptor(self):
        instance = mocks.ClassWithDescriptor(mocks.Binding(mocks.Descriptor()))
        cls = type(instance)

        result = get_descriptor_from(instance, attrname)

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

        result = get_descriptor_from(instance, attrname)

        self.assertIs(result, cls.__dict__[attrname])
    def test_with_superclass(self):
        result = get_descriptor_from(SubClass(), Class.attrname)

        self.assertIs(result, Class.__dict__[Class.attrname])
    def test_with_superclass(self):
        result = get_descriptor_from(SubClass(), Class.attrname)

        self.assertIs(result, Class.__dict__[Class.attrname])