def checkRaises(self, excClass, callableObj, *args, **kwargs):
try:<EOL><INDENT>callableObj(*args, **kwargs)<EOL><DEDENT>except excClass as e:<EOL><INDENT>return e<EOL><DEDENT>else:<EOL><INDENT>raise self.failureException("<STR_LIT>" % excClass)<EOL><DEDENT>
Assert that calling callableObj with *args and **kwargs raises an
        exception of type excClass, and return the exception object so that
        further tests on it can be performed.