'Fail unless the function call raises the expected exception.
Fail the test if an instance of the exception class
``exc_class`` is not raised when calling ``func`` with the
arguments ``*args`` and ``**kwargs``.'

def failUnlessRaises(self, exc_class, func, *args, **kwargs):

    try:
        super(TestCase, self).failUnlessRaises(exc_class, func, *args, **kwargs)
    except self.failureException:
        exc_class_name = exc_class.__name__
        msg = ('Exception    %(exc_class_name)s    not    raised    for    function    call:    func=%(func)r    args=%(args)r    kwargs=%(kwargs)r' % vars())
        raise self.failureException(msg)
