#NEWLINE# def test_saving_unloaded_value( self ) : #NEWLINE# #INDENT# 'Test saving does not delete unloaded values\n        ' #NEWLINE# state [ 'a' ] = 12 #NEWLINE# with tempfile . NamedTemporaryFile ( ) as temp : #NEWLINE# #INDENT# state . save ( temp . name ) #NEWLINE# state . reset_instance ( ) #NEWLINE# self . assertNotIn ( 'a' , state ) #NEWLINE# state . load ( self . name ) #NEWLINE# state [ 'b' ] = 12 #NEWLINE# state . save ( temp . name ) #NEWLINE# state . reset_instance ( ) #NEWLINE# self . assertNotIn ( 'a' , state ) #NEWLINE# self . assertNotIn ( 'b' , state ) #NEWLINE# state . load ( temp . name ) #NEWLINE# self . assertIn ( 'a' , state ) #NEWLINE# self . assertIn ( 'b' , state )