def validate(self):
validation_code = self.setup_src + '<STR_LIT>' + self.stmt<EOL>validation_scope = {}<EOL>exec(validation_code, validation_scope)<EOL>if len(self.groups[self.group]) == <NUM_LIT:1>:<EOL><INDENT>self.result = validation_scope['<STR_LIT>']<EOL>logging.info('<STR_LIT>'<EOL>.format(b=self))<EOL><DEDENT>else:<EOL><INDENT>compare_against_benchmark = self.groups[self.group][<NUM_LIT:0>]<EOL>test = [benchmark.result_validation for benchmark in self.groups[self.group]]<EOL>if not all(test):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>compare_result = compare_against_benchmark.result<EOL>if self.validation_func:<EOL><INDENT>results_are_valid = self.validation_func(compare_result, validation_scope['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>results_are_valid = compare_result == validation_scope['<STR_LIT>']<EOL><DEDENT>if results_are_valid:<EOL><INDENT>logging.info('<STR_LIT>'.format(self.callable.__name__))<EOL><DEDENT>else:<EOL><INDENT>error = '<STR_LIT>'<EOL>raise ValidationError(error.format(compare_against_benchmark.callable.__name__, self.callable.__name__,<EOL>compare_result, validation_scope['<STR_LIT>']))<EOL><DEDENT><DEDENT>
Execute the code once to get it's results (to be used in function validation). Compare the result to the
first function in the group.