Browse Source

Merge pull request #7124 from ThomasWaldmann/hashindex-test-win-1.2

Fix test_size_on_disk_accurate on Windows
TW 2 năm trước cách đây
mục cha
commit
01b921dea4
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/borg/testsuite/hashindex.py

+ 2 - 2
src/borg/testsuite/hashindex.py

@@ -197,8 +197,8 @@ class HashIndexSizeTestCase(BaseTestCase):
         for i in range(1234):
             idx[H(i)] = i, i**2, i**3
         with tempfile.NamedTemporaryFile() as file:
-            idx.write(file.name)
-            size = os.path.getsize(file.name)
+            idx.write(file)
+            size = os.path.getsize(file.fileno())
         assert idx.size() == size