test: itertools.chain stop iteration on error
@@ -57,6 +57,12 @@ assert next(x) == 1
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
