| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
cc @tomasr8 (sorry for choosing you but current pickle expert is inactive) |
Sorry, something went wrong.
|
Are you sure the assertions are being executed? Since self.dumps(obj, proto) raises, anything that comes after in the with block will not execute. |
Sorry, something went wrong.
|
@tomasr8 sorry for the first commit. |
Sorry, something went wrong.
|
This looks ok, but I'm not expert in his area :/ @serhiy-storchaka could you have a look? |
Sorry, something went wrong.
There was a problem hiding this comment.
Good PR, but using a global class which is not imported in test_pickle.py instead of AbstractPickleTests would fix the tests too. See #133356.
Faking the __main__ module looks heavyweight, we don't know what side effects can it have. We would use this approach if there was no other way.
Sorry, something went wrong.
| real_main = sys.modules.get("__main__") | ||
| fake_main = types.ModuleType("__main__") | ||
|
|
||
| sys.modules["__main__"] = fake_main |
There was a problem hiding this comment.
You can use support.swap_item(). It is already used in other tests to fake a module.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I found that tests stopped running successfully directly after this commit (PR #122373)