#NEWLINE# def assert_framelist_equal( list1 , list2 , * args , **kwargs ) : #NEWLINE# #INDENT# assert ( len ( list1 ) == len ( list2 ) ) , 'lists are not of equal size len(list1) == {0}, len(list2) == {1}' . format ( len ( list1 ) , len ( list2 ) ) #NEWLINE# msg = 'not all list elements are DataFrames' #NEWLINE# both_frames = all ( map ( ( lambda x , y : ( isinstance ( x , DataFrame ) and isinstance ( y , DataFrame ) ) ) , list1 , list2 ) ) #NEWLINE# assert both_frames , frame_j #NEWLINE# for ( frame_i , frame_j ) in zip ( list1 , list2 ) : #NEWLINE# #INDENT# tm . assert_frame_equal ( frame_i , frame_j , * args , ** kwargs ) #NEWLINE# assert ( not frame_i . empty ) , 'frames are both empty'