#NEWLINE# def test_overwrite_stuff( self ) : #NEWLINE# #INDENT# traj = Trajectory ( name = 'TestOverwrite' , filename = make_temp_dir ( 'testowrite.hdf5' ) , add_time = True ) #NEWLINE# res = traj . f_add_result ( 'mytest.test' , a = 'b' , c = 'd' ) #NEWLINE# traj . f_store ( ) #NEWLINE# res [ 'a' ] = np . array ( [ 1 , 2 , 3 ] ) #NEWLINE# res [ 'c' ] = 123445 #NEWLINE# traj . f_store_item ( res , overwrite = 'a' , complevel = 4 ) #NEWLINE# traj . f_store_item ( res , overwrite = [ 'a' , 'b' ] ) #NEWLINE# traj . f_load ( load_results = 3 ) #NEWLINE# res = traj . test #NEWLINE# self . assertTrue ( ( res [ 'a' ] == np . array ( [ 1 , 2 , 3 ] ) ) . all ( ) ) #NEWLINE# self . assertTrue ( ( res [ 'c' ] == 'd' ) ) #NEWLINE# res [ 'c' ] = 123445 #NEWLINE# traj . f_store_item ( res , store_data = 3 ) #NEWLINE# res . f_empty ( ) #NEWLINE# traj . f_load ( load_results = 3 ) #NEWLINE# self . assertTrue ( ( traj . test [ 'c' ] == 123445 ) )