|
@@ -258,9 +258,9 @@ class HashIndexSizeTestCase(BaseTestCase):
|
|
idx = ChunkIndex()
|
|
idx = ChunkIndex()
|
|
for i in range(1234):
|
|
for i in range(1234):
|
|
idx[H(i)] = i, i**2
|
|
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
|
|
assert idx.size() == size
|
|
|
|
|
|
|
|
|