Is there a way to make python pickle ignore “it's not the same object ” errors
问题 Is there a way to make python pickle ignore "it's not the same object " errors? I'm writing a test using Mock to have fine grain control over the results that datetime.utcnow() produces. The code I'm using is time sensitive so mock's patch makes it easy to test. The same tests need to pickle objects and send the results to a remote server. For the purpose of the test if a standard datetime was pickled and received by the remote server everything would be fine. Unfortunately the pickle module