Skip to content

Commit 8821d32

Browse files
increase fanout
1 parent 3f79009 commit 8821d32

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

unittests/test_itertools.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,20 @@ async def test_tee_share() -> None:
369369
async def tee_spawn_walker(
370370
tee_state: AsyncIterator[int], start_idx: int = 0
371371
) -> None:
372-
"""Recursively check `tee_state` elements and spawn new walkers on every step"""
372+
"""Walk and check `tee_state` elements and spawn new walkers on every step"""
373373
for idx in range(start_idx, len(items)):
374374
await Switch(0, 3)
375375
assert await a.anext(tee_state) == items[idx]
376-
tee_state, child_state = a.tee(tee_state)
377-
await Schedule(tee_spawn_walker(child_state, idx + 1))
376+
tee_state, *child_states = a.tee(tee_state, n=3)
377+
await Schedule(
378+
*(
379+
tee_spawn_walker(child_state, idx + 1)
380+
for child_state in child_states
381+
)
382+
)
378383
await Switch()
379384

380-
head_peer, *child_peers = a.tee(items, n=2)
385+
head_peer, *child_peers = a.tee(items, n=3)
381386
await Schedule(*(tee_spawn_walker(child, 0) for child in child_peers))
382387
await Switch(len(items) // 2)
383388
results = [item async for item in head_peer]

0 commit comments

Comments
 (0)