Changeset be6c0a2 in flex_extract.git for Testing/Regression/Mars_request/test_cmp_mars_requests.py
- Timestamp:
- Dec 19, 2019, 7:37:03 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 0d99607
- Parents:
- 4421b17
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Testing/Regression/Mars_request/test_cmp_mars_requests.py
- Property mode changed from 100644 to 100755
r2d1c338 rbe6c0a2 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- coding: utf-8 -*- 3 3 """Comparison of the created MARS requests of two flex_extract versions. … … 39 39 from datetime import datetime 40 40 41 sys.path.append('../../../ source/python')41 sys.path.append('../../../Source/Python') 42 42 import _config 43 from mods.tools import init12843 from Mods.tools import init128 44 44 45 45 # ------------------------------------------------------------------------------ … … 137 137 else: 138 138 err_msg += 'Unconsistency happend to be in column: ' + col + '\n' 139 print mr_new[col] 140 print mr_old[col] 139 print("THERE SEEMS TO BE AN ERROR:") 140 print("CONTENT OF NEW VERSION:") 141 print(mr_new[col]) 142 print("CONTENT OF OLD VERSION:") 143 print(mr_old[col]) 141 144 return False 142 145 return lresult … … 186 189 187 190 nsteps = str(int(steps[1]))+'/to/'+str(int(steps[-1]))+'/by/'+str(int(dtime)) 188 return nsteps 189 191 return nsteps 190 192 191 193 return mr_old … … 252 254 time_str = currenttime.strftime('%Y-%m-%d_%H-%M-%S') 253 255 logfile = os.path.join(log_path, 'log_' + time_str) 254 with open(logfile, 'a w') as f:256 with open(logfile, 'a') as f: 255 257 f.write('Compare mars requests between version ' + old_dir + 256 258 ' and version ' + new_dir + ' : \n') … … 288 290 mr_old['param'] = mr_old['param'].apply(to_param_id, args=[table128]) 289 291 mr_old['number'] = mr_old['number'].apply(convert_param_numbers) 290 if '142' in mr_old. ix[0,'param']: # if flux request291 mr_old. ix[0,'step'] = convert_param_step(mr_old.ix[0,'step'])292 293 print 'Results: ', c292 if '142' in mr_old.loc[0,'param']: # if flux request 293 mr_old.loc[0,'step'] = convert_param_step(mr_old.loc[0,'step']) 294 295 print('Results: ', c) 294 296 295 297 # do tests on mr files … … 302 304 303 305 # write out result to logging file 304 with open(logfile, 'a w') as f:306 with open(logfile, 'a') as f: 305 307 if lcoleq and lnoeq and lcoeq: 306 308 f.write('... ' + c + ' ... OK!' + '\n')
Note: See TracChangeset
for help on using the changeset viewer.