'Test that when rebuilding an instance with a __slots__ attribute, it
fails accurately instead of giving a L{rebuild.RebuildError}.'

def test_instanceSlots(self):

    classDefinition = 'class    NotSlottedClass(object):\n                pass\n'
    exec classDefinition in self.m.__dict__
    inst = self.m.NotSlottedClass()
    inst.__slots__ = ['a']
    classDefinition = 'class    NotSlottedClass:\n                pass\n'
    exec classDefinition in self.m.__dict__
    self.assertRaises(TypeError, rebuild.updateInstance, inst)
