#NEWLINE# def _check_expr_cases( self , cases , named = False ) : #NEWLINE# #INDENT# for ( expr , expected ) in cases : #NEWLINE# #INDENT# result = self . _translate ( expr , named = named ) #NEWLINE# assert ( str ( result ) == str ( expected ) ) #NEWLINE# if named : #NEWLINE# #INDENT# assert ( result . name == expected . name )