#NEWLINE# def test_key_exists( ) : #NEWLINE# #INDENT# my_dict = Datasource ( 'my_dict' ) #NEWLINE# foo_exists = key_exists ( 'foo' , my_dict ) #NEWLINE# eq_ ( solve ( foo_exists , cache = { #NEWLINE# #INDENT# my_dict : { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , True ) #NEWLINE# eq_ ( solve ( foo_exists , cache = { #NEWLINE# #INDENT# my_dict : { #NEWLINE# #INDENT# 'baz' : 'bar' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , False ) #NEWLINE# eq_ ( pickle . loads ( pickle . dumps ( foo_exists ) ) , foo_exists )