MCPcopy
hub / github.com/borgbackup/borg / test_list

Function test_list

src/borg/testsuite/legacyrepository_test.py:210–223  ·  view source on GitHub ↗
(repo_fixtures, request)

Source from the content-addressed store, hash-verified

208
209
210def test_list(repo_fixtures, request):
211 with get_repository_from_fixture(repo_fixtures, request) as repository:
212 for x in range(100):
213 repository.put(H(x), fchunk(b"SOMEDATA"))
214 repository.commit(compact=False)
215 repo_list = repository.list()
216 assert len(repo_list) == 100
217 first_half = repository.list(limit=50)
218 assert len(first_half) == 50
219 assert first_half == repo_list[:50]
220 second_half = repository.list(marker=first_half[-1])
221 assert len(second_half) == 50
222 assert second_half == repo_list[50:]
223 assert len(repository.list(limit=50)) == 50
224
225
226def test_max_data_size(repo_fixtures, request):

Callers

nothing calls this directly

Calls 6

HFunction · 0.70
fchunkFunction · 0.70
putMethod · 0.45
commitMethod · 0.45
listMethod · 0.45

Tested by

no test coverage detected