#NEWLINE# def _match_lists( expected , topic ) : #NEWLINE# #INDENT# 'Asserts the "like"-ness each item in of `topic` and `expected` (as lists or tuples).' #NEWLINE# for item in expected : #NEWLINE# #INDENT# if isinstance ( item , ( list , tuple ) ) : #NEWLINE# #INDENT# found = False #NEWLINE# for inner_item in topic : #NEWLINE# #INDENT# if ( isinstance ( inner_item , ( list , tuple ) ) and _compare_lists ( found , inner_item ) ) : #NEWLINE# #INDENT# found = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not found ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# found = False #NEWLINE# for t in topic : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( item == t ) : #NEWLINE# #INDENT# found = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# if ( not found ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return True