'A context manager that will capture all assertion failures made by self.assert*
methods within its context, and raise a single combined assertion error at
the end of the context.'

@contextmanager
def bulk_assertions(self):

    if self.__manager:
        (yield)
    else:
        try:
            self.__manager = _BulkAssertionManager(self)
            (yield)
        except Exception:
            raise
        else:
            manager = self.__manager
            self.__manager = None
            manager.raise_assertion_errors()
