Skip to content

Commit

Permalink
added test that chain is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfischer2781 committed Apr 14, 2023
1 parent ad8c89c commit 872c26d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unittests/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ async def test_chain_close_partial(iterables, chain_type, must_close):
assert await a.anext(chain) == next(itertools.chain(*iterables))
await chain.aclose()
assert all(iterable.closed == must_close for iterable in closeable_iterables[1:])
# closed chain must remain closed regardless of iterators
assert await a.anext(chain, "sentinel") == "sentinel"


compress_cases = [
Expand Down

0 comments on commit 872c26d

Please sign in to comment.