1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-04 10:39:50 +00:00

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

Fix test_size_on_disk_accurate on Windows
This commit is contained in:
TW 2022-11-04 21:12:58 +01:00 committed by GitHub
commit 01b921dea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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