![Pytest + Coverage: How to Use Them Properly | by Will Barillon | Oct, 2023 | Python in Plain English Pytest + Coverage: How to Use Them Properly | by Will Barillon | Oct, 2023 | Python in Plain English](https://miro.medium.com/v2/resize:fit:583/1*nPu3_8YdAnqJzaBTFPdikw.png)
Pytest + Coverage: How to Use Them Properly | by Will Barillon | Oct, 2023 | Python in Plain English
mock.patch cannot import an invalid-name module in >=3.11 due to importlib.import_module vs pkgutil.resolve_name differences when module has a dash in its filename · Issue #100950 · python/cpython · GitHub
![python - Pytest mock.patch requests AttributeError: does not have the attribute 'json' - Stack Overflow python - Pytest mock.patch requests AttributeError: does not have the attribute 'json' - Stack Overflow](https://i.stack.imgur.com/fQLeI.png)