MCPcopy Index your code
hub / github.com/python/cpython / test_iter_function

Method test_iter_function

Lib/test/test_iter.py:336–341  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

334
335 # Test two-argument iter() with function
336 def test_iter_function(self):
337 def spam(state=[0]):
338 i = state[0]
339 state[0] = i+1
340 return i
341 self.check_iterator(iter(spam, 10), list(range(10)), pickle=False)
342
343 # Test two-argument iter() with function that raises StopIteration
344 def test_iter_function_stop(self):

Callers

nothing calls this directly

Calls 2

check_iteratorMethod · 0.95
listClass · 0.85

Tested by

no test coverage detected