#NEWLINE# def diff_code_assert( a , b , n = 4 ) : #NEWLINE# #INDENT# if ( a != b ) : #NEWLINE# #INDENT# diff = '\n' . join ( difflib . unified_diff ( a . splitlines ( ) , b . splitlines ( ) , n = n , lineterm = '' ) ) #NEWLINE# assert False , ( 'Code does not match:\n%s\n\ncreated code:\n%s' % ( diff , a ) ) #NEWLINE# #UNINDENT# pass