'Remove \'methodName\' from \'klass\'.
If \'klass\' does not have a method named \'methodName\', then
\'removeMethod\' succeeds silently.
If \'klass\' does have a method named \'methodName\', then it is removed
using delattr. Also, methods of the same name are removed from all
base classes of \'klass\', thus removing the method entirely.
@param klass: The class to remove the method from.
@param methodName: The name of the method to remove.'

def removeMethod(self, klass, methodName):

    method = getattr(klass, methodName, None)
    if (method is None):
        return
    for base in getmro(klass):
        try:
            delattr(base, methodName)
        except (AttributeError, TypeError):
            break
        else:
            self.addCleanup(setattr, base, methodName, method)
