Skip to content

Commit

Permalink
Fix test cache_zip_file_changed_modtime (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz authored Dec 4, 2023
1 parent 2d7af06 commit 0eb6653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/core/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def test_cache_zip_file_changed_modtime():
ds_path = ds.path

# second pass - changed modtime
# TODO: here we have to assume more than 1 ns passed since the
# zip file was created.
os.utime(zip_path, None)
st = os.stat(zip_path)
m_time = (st.st_atime_ns + 10, st.st_mtime_ns + 10)
os.utime(zip_path, ns=m_time)
ds2 = from_source("file", zip_path)
assert len(ds2) == 2
assert ds2.path != ds_path
Expand Down

0 comments on commit 0eb6653

Please sign in to comment.