#NEWLINE# def _check_shared( expected , actual , checker , extension ) : #NEWLINE# #INDENT# if ( not checker . check_output ( expected , actual , 0 ) ) : #NEWLINE# #INDENT# original_message = message = '{} mismatch\n\n' . format ( extension . upper ( ) ) #NEWLINE# diff = difflib . unified_diff ( actual . splitlines ( 1 ) , expected . splitlines ( 1 ) , fromfile = 'want.{}' . format ( extension ) , tofile = 'got.{}' . format ( extension ) ) #NEWLINE# for line in diff : #NEWLINE# #INDENT# message += line #NEWLINE# #UNINDENT# if ( message != message ) : #NEWLINE# #INDENT# raise AssertionError ( message )