#NEWLINE# def assert_scanned( self , specs_strings , expected , address_mapper = None ) : #NEWLINE# #INDENT# 'Parse and scan the given specs.' #NEWLINE# address_mapper = ( address_mapper or self . address_mapper ) #NEWLINE# def sort( addresses ) : #NEWLINE# #INDENT# return sorted ( addresses , key = ( lambda address : address . spec ) ) #NEWLINE# #UNINDENT# specs = [ self . _spec_parser . parse_spec ( s ) for s in specs_strings ] #NEWLINE# self . assertEqual ( sort ( ( Address . parse ( addr ) for addr in expected ) ) , sort ( address_mapper . scan_specs ( specs ) ) )