tests: fix diff cmd test on macOS HFS+, fixes #8860

If we touch too quickly after file creation, it would not noticably update the timestamp.
This commit is contained in:
Thomas Waldmann 2025-05-21 14:39:39 +02:00
parent 39b847a138
commit b4c4bf0b3f
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -53,6 +53,7 @@ def test_basic_functionality(archivers, request):
create_regular_file(archiver.input_path, "file_replaced", contents=b"0" * 4096)
os.unlink("input/file_removed")
os.unlink("input/file_removed2")
time.sleep(1) # macOS HFS+ has a 1s timestamp granularity
Path("input/file_touched").touch()
os.rmdir("input/dir_replaced_with_file")
create_regular_file(archiver.input_path, "dir_replaced_with_file", size=8192)