def process(self, fragment): r = TestRig(fixture=self).process_fragment(fragment) result = Result() result.successCount = r.num_success result.failureCount = r.num_failure result.exceptionCount = r.num_exception lastEvent = r.last_failed_event() if lastEvent is not None: result.lastActualValue = lastEvent.actual result.lastExpectedValue = lastEvent.expected return result