'Calls func and succeeds if and only if no exception is raised
(i.e. converts exception raising into a failed testcase). Returns
the return value of func.'

def should_not_fail(self, func):

    try:
        return func()
    except Exception as exc:
        self.fail(str(exc))
