'If a class change after an instance has been created,
L{aot.unjellyFromSource} shoud raise a C{TypeError} when trying to
unjelly the instance.'

def test_methodNotSelfIdentity(self):

    a = A()
    b = B()
    a.bmethod = b.bmethod
    b.a = a
    savedbmethod = B.bmethod
    del B.bmethod
    try:
        self.assertRaises(TypeError, aot.unjellyFromSource, aot.jellyToSource(b))
    finally:
        B.bmethod = savedbmethod
