1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 01:37:20 +00:00

testsuite: archiver: skip test_file_status_cs_cache_mode on Windows

On Windows, the ctime attribute of stat represents the time of creation, unlike Unix.
See https://docs.python.org/3/library/os.html#os.stat_result.st_ctime
This commit is contained in:
Rayyan Ansari 2022-11-29 16:53:56 +00:00
parent 12245761c0
commit fff2c21e65

View file

@ -547,6 +547,9 @@ def test_file_status(self):
# https://borgbackup.readthedocs.org/en/latest/faq.html#i-am-seeing-a-added-status-for-a-unchanged-file # https://borgbackup.readthedocs.org/en/latest/faq.html#i-am-seeing-a-added-status-for-a-unchanged-file
self.assert_in("A input/file2", output) self.assert_in("A input/file2", output)
@pytest.mark.skipif(
is_win32, reason="ctime attribute is file creation time on Windows"
) # see https://docs.python.org/3/library/os.html#os.stat_result.st_ctime
def test_file_status_cs_cache_mode(self): def test_file_status_cs_cache_mode(self):
"""test that a changed file with faked "previous" mtime still gets backed up in ctime,size cache_mode""" """test that a changed file with faked "previous" mtime still gets backed up in ctime,size cache_mode"""
self.create_regular_file("file1", contents=b"123") self.create_regular_file("file1", contents=b"123")