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
When trying to raise a user-defined exception the exception is not get inited correctly. Instead of the Exeption class it catch a tupple in the user defined handler instead. Could run the test like below to see if it works:
def test_exception():
with self.assertRaises(RseException) as context:
raise (RseException("test",700)
self.assertTrue(type(context.exception) is RseException)
self.assertEquals(context.exception.message, "test")
self.assertEquals(context.exception.code, 700)
The text was updated successfully, but these errors were encountered:
When trying to raise a user-defined exception the exception is not get inited correctly. Instead of the Exeption class it catch a tupple in the user defined handler instead. Could run the test like below to see if it works:
def test_exception():
with self.assertRaises(RseException) as context:
raise (RseException("test",700)
self.assertTrue(type(context.exception) is RseException)
self.assertEquals(context.exception.message, "test")
self.assertEquals(context.exception.code, 700)
The text was updated successfully, but these errors were encountered: