I'm trying to mock a classmethod in a superclass but when restoring it
a strange behavior happens in subclasses (tested on Python 2.5)
Anyone knows why this happens? (see test case below for details)
Is there any way to restore that original method to have the original behavior?
original = Super.GetCls
#Mock Super.GetCls, and do tests...
Super.GetCls = original #Restore the original classmethod
self.assertEqual(Sub.GetCls(), Sub) #The call to the
classmethod subclass returns the cls as Super and not Sub as expected!