File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -274,14 +274,19 @@ def test_os_dup(tmpdir):
274274 io_module = "POSIX"
275275 key = "POSIX_BYTES_WRITTEN"
276276
277+ # check if log file exists
278+ if not os .path .isfile (path_to_log ) :
279+ print (f"Darshan log file '{ path_to_log } ' does not exist" )
280+ else :
281+ print (f"Darshan log file '{ path_to_log } '" )
282+
277283 try :
278284 with darshan .DarshanReport (path_to_log , filter_patterns = [target_filename ], filter_mode = 'include' ) as report :
279285 try :
280286 records = report .records [io_module ].to_dict ()
281287 if len (records ) > 0 :
282- rec = report .records [io_module ].to_dict ()
283288 try :
284- value = rec [0 ]["counters" ][key ]
289+ value = records [0 ]["counters" ][key ]
285290 print (f"key '{ key } ' has value of '{ value } '" )
286291 assert value == 928
287292 except KeyError :
You can’t perform that action at this time.
0 commit comments