#NEWLINE# def assertEqualDiffs( self , expected , actual ) : #NEWLINE# #INDENT# 'True if actual is similar enough to expected, minus svn properties' #NEWLINE# def filter_block( block ) : #NEWLINE# #INDENT# 'removes property information that varies between systems, not relevant fo runit test' #NEWLINE# newblock = [ ] #NEWLINE# for line in block . splitlines ( ) : #NEWLINE# #INDENT# if ( re . search ( '[=+-\\@ ].*' , line ) == None ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fixedline = re . sub ( '\\(revision [0-9]+\\)' , '(working copy)' , line ) #NEWLINE# fixedline = re . sub ( '\\(nonexistent\\)' , '(working copy)' , fixedline ) #NEWLINE# newblock . append ( fixedline ) #NEWLINE# #UNINDENT# #UNINDENT# return '\n' . join ( newblock ) #NEWLINE# #UNINDENT# filtered_actual_blocks = [ ] #NEWLINE# for block in actual . split ( '\nIndex: ' ) : #NEWLINE# #INDENT# if ( filtered_actual_blocks != [ ] ) : #NEWLINE# #INDENT# block = ( 'Index: ' + block ) #NEWLINE# #UNINDENT# block = filter_block ( block ) #NEWLINE# filtered_actual_blocks . append ( block ) #NEWLINE# #UNINDENT# expected_blocks = [ ] #NEWLINE# for block in expected . split ( '\nIndex: ' ) : #NEWLINE# #INDENT# if ( expected_blocks != [ ] ) : #NEWLINE# #INDENT# block = ( 'Index: ' + block ) #NEWLINE# #UNINDENT# block = filter_block ( block ) #NEWLINE# expected_blocks . append ( block ) #NEWLINE# #UNINDENT# filtered = '\n' . join ( filtered_actual_blocks ) #NEWLINE# self . assertEquals ( set ( expected_blocks ) , set ( filtered_actual_blocks ) )