Skip to content

Commit

Permalink
TempFileWrappers aren't filenames and I know better than that but I s…
Browse files Browse the repository at this point in the history
…till made the mistake. Wee!
  • Loading branch information
daxpryce committed Oct 24, 2024
1 parent 5db81de commit 46624cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_memmap(self):
expected = random_vectors(10_000, 100, dtype=np.float32)
with vectors_as_temp_file(expected) as vecs_file:
with tempfile.NamedTemporaryFile() as vecs_file_copy:
shutil.copyfile(vecs_file, vecs_file_copy)
shutil.copyfile(vecs_file, vecs_file_copy.name)
actual = dap.vectors_from_file(
vecs_file,
dtype=np.float32,
Expand All @@ -32,7 +32,7 @@ def test_memmap(self):
self.assertTrue((expected == actual).all(), f"{expected == actual}\n{expected}\n{actual}")
# windows refuses to allow 2 active handles via memmap to touch the same file
# that's why we made a copy of the file itself and are using the copy here to test
# the read+append(inmem)
# the read+append(inmem)
actual = dap.vectors_from_file(
vecs_file_copy,
dtype=np.float32,
Expand Down

0 comments on commit 46624cd

Please sign in to comment.