#NEWLINE# def check_errors_for_arguments( self , errors , args ) : #NEWLINE# #INDENT# 'Checks that there is exactly one error for each given argument.' #NEWLINE# missing = [ ] #NEWLINE# remaining = list ( errors ) #NEWLINE# for arg in args : #NEWLINE# #INDENT# found = False #NEWLINE# for error in remaining : #NEWLINE# #INDENT# if ( arg in error ) : #NEWLINE# #INDENT# remaining . remove ( error ) #NEWLINE# found = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not found ) : #NEWLINE# #INDENT# missing . append ( ( 'Missing error for: ' + arg ) ) #NEWLINE# #UNINDENT# #UNINDENT# return ( missing + remaining )