Pārlūkot izejas kodu

win32: do not test for ctime difference

ctime is file creation time on windows and is not updated on "touch".
Thomas Waldmann 8 mēneši atpakaļ
vecāks
revīzija
1e4314f367
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      src/borg/testsuite/archiver/diff_cmd_test.py

+ 3 - 1
src/borg/testsuite/archiver/diff_cmd_test.py

@@ -173,7 +173,9 @@ def test_basic_functionality(archivers, request):
         unexpected = {"type": "modified", "added": 0, "removed": 0}
         assert unexpected not in get_changes("input/file_touched", joutput)
         if not content_only:
-            assert {"ctime", "mtime"}.issubset({c["type"] for c in get_changes("input/file_touched", joutput)})
+            # on win32, ctime is the file creation time and does not change.
+            expected = {"mtime"} if is_win32 else {"mtime", "ctime"}
+            assert expected.issubset({c["type"] for c in get_changes("input/file_touched", joutput)})
         else:
             # And if we're doing content-only, don't show the file at all.
             assert not any(get_changes("input/file_touched", joutput))