Records an example's (aka, unittest's) results. If error is specified, records the
        run as a failure.

        Returns True if the example passed and False on failure.

def record_example(self, example):
        """Records an example's (aka, unittest's) results. If error is specified, records the
        run as a failure.

        Returns True if the example passed and False on failure.
        """
        self.num_examples += 1
        self.total_real_time += example.real_time
        self.total_user_time += example.user_time
        if not example.error:
            self.num_passed += 1
            self._write_example_passed(example)
        else:
            self.num_failed += 1
            self._write_example_failed(example)
            error = ErrorFormat(
                example.name, example.error, example.traceback,
                tuple(self.group_stack), example.stdout, example.stderr
            )
            self.errors.append(error)
        return not example.error