Issue 26611: assertRaises callableObj cannot be used as a keyword with args (original) (raw)
assertRaises has callableObj listed as a keyword, though it is not possible to use it as a keyword when the callableObj takes arguments.
The function definition is: def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
Therefore, using it with a keyword such as:
self.assertRaises(Exception, callableObj=my_function, args_to_function)
will fail due to passing arguments after a keyword.