GitHub - microsoft/python-import-mocker: Easily import a module and mock its dependencies in an isolated way.
![miguelgrinberg@mstdn.social on Twitter: "I guess this isn't something people do every day, but Python 3.11 has a regression in that mocking starts failing silently after you mock the import subsystem. https://t.co/WWOhypcjBk" / miguelgrinberg@mstdn.social on Twitter: "I guess this isn't something people do every day, but Python 3.11 has a regression in that mocking starts failing silently after you mock the import subsystem. https://t.co/WWOhypcjBk" /](https://pbs.twimg.com/media/FgFWUQpVsAUtV8T.jpg:large)
miguelgrinberg@mstdn.social on Twitter: "I guess this isn't something people do every day, but Python 3.11 has a regression in that mocking starts failing silently after you mock the import subsystem. https://t.co/WWOhypcjBk" /
![Real Python on Twitter: "🐍 Understanding the Python Mock Object Library — https://t.co/JA7sL3bIvA #python https://t.co/QsDs2rAr4X" / Twitter Real Python on Twitter: "🐍 Understanding the Python Mock Object Library — https://t.co/JA7sL3bIvA #python https://t.co/QsDs2rAr4X" / Twitter](https://pbs.twimg.com/media/E_6poO8VkAQbQwD.png:large)
Real Python on Twitter: "🐍 Understanding the Python Mock Object Library — https://t.co/JA7sL3bIvA #python https://t.co/QsDs2rAr4X" / Twitter
![How to write tests in Python and Django using mocking | 20tab's blog | Development & Growth Marketing How to write tests in Python and Django using mocking | 20tab's blog | Development & Growth Marketing](https://media.20tab.com/Production/media/article/image-top/test-python-mocking.png)