'Calls "func" and fails if it doesn\'t raise the right exception
(any exception by default). Also returns the exception in question.'

def should_fail(self, func, exc_type=Exception):

    try:
        func()
        self.fail(('Expected    an    exception    of    type    %r' % exc_type))
    except exc_type as e:
        self.assertTrue(isinstance(e, exc_type))
        return e
