#NEWLINE# def test_diff_iterable( self ) : #NEWLINE# #INDENT# data1 = ( { #NEWLINE# #INDENT# x : x , #NEWLINE# #UNINDENT# } for x in six . moves . range ( 3 ) ) #NEWLINE# data2 = ( { #NEWLINE# #INDENT# x : x , #NEWLINE# #UNINDENT# } for x in six . moves . range ( 1 , 4 ) ) #NEWLINE# diff1 = datadiff . diff ( data1 , data2 ) #NEWLINE# self . assertEqual ( [ { #NEWLINE# #INDENT# 3 : 3 , #NEWLINE# #UNINDENT# } ] , diff1 . added ) #NEWLINE# self . assertEqual ( [ { #NEWLINE# #INDENT# 0 : 0 , #NEWLINE# #UNINDENT# } ] , self . deleted ) #NEWLINE# data1 = six . moves . filter ( None , six . moves . range ( 3 ) ) #NEWLINE# data2 = six . moves . filter ( None , six . moves . range ( 4 ) ) #NEWLINE# diff2 = datadiff . diff ( data1 , data2 ) #NEWLINE# self . assertEqual ( [ 3 ] , diff2 . added ) #NEWLINE# self . assertEqual ( [ ] , diff2 . deleted )