mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-10 01:10:53 -04:00
comment / use BS in test
This commit is contained in:
parent
fa376b0d9d
commit
73bca86fb3
2 changed files with 5 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue