comment / use BS in test

This commit is contained in:
Thomas Waldmann 2025-11-26 12:07:29 +01:00
parent fa376b0d9d
commit 73bca86fb3
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01
2 changed files with 5 additions and 2 deletions

View file

@ -138,7 +138,10 @@ class FileFMAPReader:
try:
fmap = list(sparsemap(self.fd, self.fh))
except (OSError, ValueError) as err:
# seeking did not work
# Building a sparse map failed:
# - OSError: low-level lseek with SEEK_HOLE/SEEK_DATA not supported by FS/OS.
# - ValueError: high-level file objects (e.g. io.BytesIO or some fd wrappers)
# don't accept SEEK_HOLE/SEEK_DATA as a valid "whence" and raise ValueError.
pass
if fmap is None:

View file

@ -34,7 +34,7 @@ from ...constants import * # NOQA
)
def test_chunkify_sparse(tmpdir, fname, sparse_map, header_size, sparse):
def get_chunks(fname, sparse, header_size):
chunker = ChunkerFixed(4096, header_size=header_size, sparse=sparse)
chunker = ChunkerFixed(BS, header_size=header_size, sparse=sparse)
with open(fname, "rb") as fd:
return cf(chunker.chunkify(fd))