def METHOD_NAME(self):
    C1, C2 = new_classes()
    ## new style
    class D(C2): pass
    d = D()
    d.x = 10
    C2.__getattr__ = return_100
    self.assertEqual(d.y, 100)
    del C2.__getattr__
    def f(self, name, value): self.__dict__[name] = value + 10
    C2.__setattr__ = f
    d.x = 20
    self.assertEqual(d.x, 30)
    del C2.__setattr__
    C2.__getattribute__ = return_100
    #self.assertEqual(d.x, 100)  # bug 365242
    ## old style
    class D(C1): pass
    d = D()
    C1.__getattr__ = return_100
    #self.assertRaises(AttributeError, lambda: d.y)  # (no?) dynamism for old style, bug 365266
    class D(C1): pass
    d = D()
    d.x = 10
    self.assertEqual([d.x, d.y], [10, 100])
    C1.__setattr__ = f
    class D(C1): pass
    d = D()
    d.x = 20
    self.assertEqual([d.x, d.y], [30, 100])
    C1.__getattribute__ = lambda *args: 200
    class D(C1): pass
    d = D()
    self.assertEqual([d.x, d.y], [200, 200])