Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: itertools.chain stop iteration on error
  • Loading branch information
rng-dynamics committed Jun 14, 2022
commit 33bcc89e9447b3b58a72259ddb46f8fdb1fb78d1
6 changes: 6 additions & 0 deletions extra_tests/snippets/stdlib_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
assert next(x) == 0
assert next(x) == 1

x = chain(1, [2])
with assert_raises(TypeError):
next(x)
with assert_raises(StopIteration):
next(x)

# itertools.count tests

# default arguments
Expand Down