I have installed a third party wheel file and I implemented/used one of the classes & exceptions(from wheel) into my piece of code. I wrote some unit-test cases for my piece of code. I am able to mock all the imports from wheel file apart from Exceptions. When I tried I am seeing following error :
TypeError: catching classes that do not inherit from BaseException is not allowed
Over Pycharm I overcome this scenario by installing wheel file and catching original exceptions instead of mocking them.
Whenever I tried to run the same class using coverage module (via terminal) I am seeing same exception again.
command I used to run this code:
python3 -m coverage -m unittest2 *.py
I am seeing the following error:
TypeError: catching classes that do not inherit from BaseException is not allowed