#NEWLINE# def run_usages( self , compare_cb ) : #NEWLINE# #INDENT# result = self . script ( ) . usages ( ) #NEWLINE# self . correct = self . correct . strip ( ) #NEWLINE# compare = sorted ( ( ( r . module_name , r . line , r . column ) for r in result ) ) #NEWLINE# wanted = [ ] #NEWLINE# if ( not self . correct ) : #NEWLINE# #INDENT# positions = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# positions = literal_eval ( self . correct ) #NEWLINE# #UNINDENT# for pos_tup in positions : #NEWLINE# #INDENT# if ( type ( wanted [ 0 ] ) == str ) : #NEWLINE# #INDENT# wanted . append ( pos_tup ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# line = pos_tup [ 0 ] #NEWLINE# if ( pos_tup [ 0 ] is not None ) : #NEWLINE# #INDENT# line += self . line_nr #NEWLINE# #UNINDENT# wanted . append ( ( self . module_name , line , pos_tup [ 1 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# return compare_cb ( self , compare , sorted ( wanted ) )