#NEWLINE# def test_local_dict( ) : #NEWLINE# #INDENT# local_dict = { #NEWLINE# #INDENT# 'my_function' : ( lambda x : ( x + 2 ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# inputs = { #NEWLINE# #INDENT# 'my_function(2)' : Integer ( 4 ) , #NEWLINE# #UNINDENT# } #NEWLINE# for ( text , result ) in inputs . items ( ) : #NEWLINE# #INDENT# assert ( parse_expr ( text , local_dict = local_dict ) == result )