'Tests that subclasses don\'t destroy the __setattr__.'

def test_subclass_setattr(self):

    class ClassWithFinal(with_metaclass(FinalMeta, object), ):
        @final
        def f(self):
            return 'ClassWithFinal:    f'
    class SubClass(ClassWithFinal, ):
        def __init__(self):
            self.a = 'a'
    SubClass()
    self.assertEqual(SubClass().a, 'a')
    self.assertEqual(SubClass().f(), 'ClassWithFinal:    f')
