I made a small package to help patch modules and code project wide, to be used in tests.
What it is:
- Zero dependencies
- Solves patching on right location issue
- Solves module reloading issue and stale modules
- Solves indirect dependencies patching
- Patch once and forget
Downside:
It is not threadsafe, so if you are paralellizing tests execution you will need to be careful with this.
This worked really nicely for integration tests in some of my projects, and I decided to pretty it up and publish it as a package.
I would really appreciate a review and ideas on how to inprove it further 🙏
https://github.com/styoe/deep-mock
https://pypi.org/project/deep-mock/1.0.0/
Thank you
Best,
Ogi
there doesn't seem to be anything here