Skip to content

Commit cb68990

Browse files
test unpacking tee
1 parent 5439975 commit cb68990

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

typetests/test_itertools.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ async def test_tee() -> None:
5656
assert_type(x, int)
5757

5858

59+
async def test_tee_iter() -> None:
60+
x1, x2 = itertools.tee([1], n=2)
61+
assert_type(x1, AsyncIterator[int])
62+
assert_type(x2, AsyncIterator[int])
63+
64+
for xi in itertools.tee([1], n=2):
65+
async for x in xi:
66+
assert_type(x, int)
67+
68+
5969
async def test_pairwise() -> None:
6070
async for x in itertools.pairwise([1]):
6171
assert_type(x, "tuple[int, int]")

0 commit comments

Comments
 (0)