Skip to content

Commit 7d74a4f

Browse files
committed
test: cover iterating without chunk_size
1 parent e0bcb2a commit 7d74a4f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎docs/02_concepts/08_pagination.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ automatically, so you don't need to manage offsets, limits or cursors yourself.
5555

5656
To control how many items each API call fetches, pass `chunk_size`. It caps the size of every page, and a page
5757
never asks for more items than `limit` has left. Without `chunk_size`, collection clients let the API pick the
58-
page size.
58+
page size, while the storage helpers fetch 1,000 items per call.
5959

6060
The example below iterates over every Actor owned by the current user using a collection client's `iterate`
6161
method:

‎tests/unit/test_client_pagination.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def __hash__(self) -> int:
445445
'chunk_size',
446446
{'chunk_size': 100, 'limit': 250},
447447
create_items(0, 250),
448-
COLLECTION_CLIENTS | STORAGE_CLIENTS,
448+
OPTIONS_CLIENTS,
449449
),
450450
_PaginationCase(
451451
'Offset, limit, chunk_size',
@@ -679,6 +679,7 @@ async def test_rq_list_requests_iterable_async(
679679
id=f'{client_name}:{case_id}',
680680
)
681681
for case_id, inputs, expected_pages in (
682+
('no chunk_size', {}, [(0, 0), (1000, 0), (2000, 0), (2500, 0)]),
682683
(
683684
'chunk_size',
684685
{'chunk_size': 400},

0 commit comments

Comments
 (0)