Comment 2 for bug 628385

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

This should not be necessary, because the method is wrapped in this logic:

        def run_wrapper(*args, **kwargs):
            try:
                return run_method(*args, **kwargs)
            finally:
                self.__cleanup()

self.__cleanup() will call mocker.reset(), which does the restoring.

If you believe there's a problem in this logic, can you please provide a test case which demonstrates the problem?