def loop_options(options):
def ch(option, parsed_option):<EOL><INDENT>return lambda self: self.check_valid_option(option, parsed_option)<EOL><DEDENT>for i, items in enumerate(options):<EOL><INDENT>prefix_tmp = "<STR_LIT>" % (items[<NUM_LIT:0>], i)<EOL>setattr(TestOptions, "<STR_LIT>" % prefix_tmp, ch(items[<NUM_LIT:1>], items[<NUM_LIT:2>]))<EOL><DEDENT>
Loop over list of options and dynamically create tests