#NEWLINE# def test_merging_errors_if_trajs_do_not_match( self ) : #NEWLINE# #INDENT# self . filenames = [ make_temp_dir ( os . path . join ( 'experiments' , 'tests' , 'HDF5' , 'merge_errors.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 [ 0 , 1 ] : #NEWLINE# #INDENT# add_params ( self . trajs [ irun ] , self . param_dict ) #NEWLINE# #UNINDENT# self . explore ( self . trajs [ 0 ] ) #NEWLINE# self . explore ( irun . trajs [ 1 ] ) #NEWLINE# for irun in [ 0 , 1 ] : #NEWLINE# #INDENT# self . make_run ( self . envs [ irun ] ) #NEWLINE# #UNINDENT# for irun in [ 0 , 1 ] : #NEWLINE# #INDENT# self . trajs [ irun ] . f_load_skeleton ( ) #NEWLINE# self . trajs [ irun ] . f_load ( load_parameters = pypetconstants . UPDATE_DATA , load_derived_parameters = pypetconstants . UPDATE_DATA , load_results = pypetconstants . UPDATE_DATA , load_other_data = pypetconstants . UPDATE_DATA ) #NEWLINE# #UNINDENT# self . trajs [ 0 ] . f_add_parameter ( 'Merging.Denied' , 13 ) #NEWLINE# merged_traj = self . trajs [ 0 ] #NEWLINE# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# merged_traj . f_merge ( self . trajs [ 1 ] ) #NEWLINE# #UNINDENT# self . trajs [ 1 ] . f_add_parameter ( 'Merging.Denied' , 13.13 ) #NEWLINE# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# merged_traj . f_merge ( self . trajs [ 1 ] ) #NEWLINE# #UNINDENT# self . trajs [ 1 ] . f_get ( 'Denied' ) . f_unlock ( ) #NEWLINE# self . trajs [ 1 ] . f_get ( 'Denied' ) . f_set ( 15 ) #NEWLINE# merged_traj . f_merge ( self . trajs [ 1 ] )