Is it possible to use assertRaises with multiple types of exceptions. Some thing like
assertRaises(RuntimeError, "error message")
assertRaises(Exception, "exception message")
both these errors occur in my code at different places with the same call.
How can I write a singel assertRaises statement to handle both.
As you can imagine the unit test case fails when only one of the execptions is mentioned.
Straight from the docs:
So, your code should look like