#NEWLINE# def test_removal( self ) : #NEWLINE# #INDENT# self . filenames = [ make_temp_dir ( os . path . join ( 'experiments' , 'tests' , 'HDF5' , 'removal.hdf5' ) ) , 0 ] #NEWLINE# self . envs = [ ] #NEWLINE# self . trajs = [ ] #NEWLINE# for ( irun , filename ) in enumerate ( self . filenames ) : #NEWLINE# #INDENT# if isinstance ( filename , int ) : #NEWLINE# #INDENT# filename = self . filenames [ filename ] #NEWLINE# #UNINDENT# self . make_environment ( irun , filename ) #NEWLINE# #UNINDENT# self . param_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# create_param_dict ( self . param_dict ) #NEWLINE# for irun in range ( len ( self . filenames ) ) : #NEWLINE# #INDENT# add_params ( self . trajs [ irun ] , self . param_dict ) #NEWLINE# #UNINDENT# self . explore ( self . trajs [ 0 ] ) #NEWLINE# self . explore ( self . trajs [ 1 ] ) #NEWLINE# for irun in range ( len ( self . filenames ) ) : #NEWLINE# #INDENT# self . make_run ( self . envs [ irun ] ) #NEWLINE# #UNINDENT# self . trajs [ 0 ] . f_add_parameter ( 'Delete.Me' , 'I will be deleted!' ) #NEWLINE# self . trajs [ 0 ] . f_store_item ( 'Delete.Me' ) #NEWLINE# self . trajs [ 0 ] . f_remove_item ( self . trajs [ 0 ] . f_get ( 'Delete.Me' ) ) #NEWLINE# self . assertTrue ( ( 'Delete.Me' not in self . trajs [ 0 ] ) , 'Delete.Me is still in traj' ) #NEWLINE# self . trajs [ 0 ] . f_load_skeleton ( ) #NEWLINE# self . trajs [ 0 ] . f_load_item ( 'Delete.Me' ) #NEWLINE# self . trajs [ 0 ] . f_delete_item ( self . trajs [ 0 ] . f_get ( 'Delete.Me' ) , remove_from_trajectory = True ) #NEWLINE# self . trajs [ 0 ] . f_load_skeleton ( ) #NEWLINE# self . assertTrue ( ( not ( 'Delete.Me' in self . trajs [ 0 ] ) ) , 'Delete.Me is still in traj' ) #NEWLINE# for irun in range ( len ( filename . filenames ) ) : #NEWLINE# #INDENT# self . trajs [ irun ] . f_load_child ( 'results' , recursive = True , load_data = pypetconstants . OVERWRITE_DATA ) #NEWLINE# self . trajs [ irun ] . f_load_child ( 'derived_parameters' , recursive = True , load_data = pypetconstants . OVERWRITE_DATA ) #NEWLINE# #UNINDENT# self . compare_trajectories ( self . trajs [ 0 ] , self . trajs [ 1 ] )