New submission from R. Samuel Klatchko <r...@google.com>:
Right now, this code: class FooError(Exception): pass class BarError(Exception): pass def test_me(self): with self.assertRaises(FooError): raise BarError("something") will have the error "BarError: something" with no indication that an exception was expected but just that we got the wrong one. It would be help to change the message to something like: Expected exception of type FooError but exception BarError('something') was raised. ---------- messages: 389328 nosy: rsk2 priority: normal severity: normal status: open title: change assertRaises message when wrong exception is raised _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43596> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com