You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main reason is that Python 3 does not allow catching exceptions that don't inherit from BaseException. In Python 2 you could catch anything at all.
This caused the failure of TextTest self-tests NoSuchUser and NoSuchSender. Have fixed these for now by hacking in the mock file, should be reverted when this is fixed.
The text was updated successfully, but these errors were encountered:
Basic problem is the situation when you have two levels of exception in the intercepted module.
class MyBaseException(RuntimeError):
pass
class MyDerivedException(MyBaseException):
pass
Capturemock represents this as
<-PYT:raise MyDerivedException(MyBaseException, RuntimeError)("error msg")
but this leads to a multiple inheritance situation and crucially MyBaseException ends up not being derived from RuntimeError, meaning if the code catches it failure will result.
All failing self-tests have either been worked around or disabled though (not all were this issue in the end, in some cases exceptions had just been renamed).
The main reason is that Python 3 does not allow catching exceptions that don't inherit from BaseException. In Python 2 you could catch anything at all.
This caused the failure of TextTest self-tests NoSuchUser and NoSuchSender. Have fixed these for now by hacking in the mock file, should be reverted when this is fixed.
The text was updated successfully, but these errors were encountered: