فهرست منبع

hfs+ filesystem (darwin64 VM) has 1s ts granularity, fixes #7387

Thomas Waldmann 2 سال پیش
والد
کامیت
98338f4cc0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/borg/testsuite/archiver/create_cmd.py

+ 2 - 2
src/borg/testsuite/archiver/create_cmd.py

@@ -13,7 +13,7 @@ import pytest
 from ... import platform
 from ...constants import *  # NOQA
 from ...manifest import Manifest
-from ...platform import is_cygwin, is_win32
+from ...platform import is_cygwin, is_win32, is_darwin
 from ...repository import Repository
 from .. import has_lchflags
 from .. import changedir
@@ -713,7 +713,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
         assert result["Modified files"] == 0
         # Archive a dir with two added files
         self.create_regular_file("testfile1", contents=b"test1")
-        time.sleep(0.01)  # testfile2 must have newer timestamps than testfile1
+        time.sleep(1.0 if is_darwin else 0.01)  # testfile2 must have newer timestamps than testfile1
         self.create_regular_file("testfile2", contents=b"test2")
         result = self.cmd(f"--repo={self.repository_location}", "create", "--stats", "test_archive2", self.input_path)
         result = to_dict(result)