#NEWLINE# def parameterized_test_case( cls ) : #NEWLINE# #INDENT# 'Class decorator to process parameterized tests\n\n    This allows for parameterization to be used for potentially any\n    unittest compatible runner; including testr and py.test.\n    ' #NEWLINE# tests_to_remove = [ ] #NEWLINE# tests_to_add = [ ] #NEWLINE# for ( key , val ) in six . iteritems ( vars ( cls ) ) : #NEWLINE# #INDENT# if ( key . startswith ( 'test_' ) and val . __dict__ . get ( 'build_data' ) ) : #NEWLINE# #INDENT# ( to_remove , to_add ) = process_parameterized_function ( name = key , func_obj = val , build_data = val . __dict__ . get ( 'build_data' ) ) #NEWLINE# tests_to_remove . extend ( to_remove ) #NEWLINE# tests_to_add . extend ( to_add ) #NEWLINE# #UNINDENT# #UNINDENT# [ setattr ( cls , name , func ) for ( name , func ) in tests_to_add ] #NEWLINE# [ delattr ( cls , key ) for key in tests_to_remove if hasattr ( cls , key ) ] #NEWLINE# return cls