Browse Source

Merge pull request #7251 from puetzk/test_size_on_disk_accurate-flush

Fix test_size_on_disk_accurate for large st_blksize, fixes #7250
TW 2 years ago
parent
commit
fb9717567e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/borg/testsuite/hashindex.py

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

@@ -258,9 +258,9 @@ class HashIndexSizeTestCase(BaseTestCase):
         idx = ChunkIndex()
         for i in range(1234):
             idx[H(i)] = i, i**2
-        with tempfile.NamedTemporaryFile() as file:
-            idx.write(file)
-            size = os.path.getsize(file.fileno())
+        with unopened_tempfile() as filepath:
+            idx.write(filepath)
+            size = os.path.getsize(filepath)
         assert idx.size() == size