File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3308,17 +3308,18 @@ def test_access_time__issue_700(self):
3308
3308
data_path = iRODSPath (self .coll .path ,
3309
3309
unique_name (my_function_name (), datetime .now ())
3310
3310
)
3311
+
3312
+ time .sleep (2 )
3313
+
3311
3314
with self .sess .data_objects .open (data_path ,"w" ) as f :
3312
3315
f .write (b'_' )
3316
+
3317
+ # At this point, the access_time should be earlier than the modify_time; next we will
3318
+ # test that a read() will the update the access timestamp to be equal or greater.
3313
3319
with self .sess .data_objects .open (data_path ,"r" ) as f :
3314
3320
f .read ()
3315
-
3316
3321
data = self .sess .data_objects .get (data_path )
3317
-
3318
- # The difference between the two timestamps should be positive but less than a second.
3319
- time_difference = data .access_time - data .modify_time
3320
- self .assertGreaterEqual (time_difference , timedelta (seconds = 0 ))
3321
- self .assertLessEqual (time_difference , timedelta (seconds = 1 ))
3322
+ self .assertGreaterEqual (data .access_time , data .modify_time )
3322
3323
3323
3324
if __name__ == "__main__" :
3324
3325
# let the tests find the parent irods lib
You can’t perform that action at this time.
0 commit comments