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

Method test_iter_idempotency

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

Source from the content-addressed store, hash-verified

154
155 # Test that iter(iter(x)) is the same as iter(x)
156 def test_iter_idempotency(self):
157 seq = list(range(10))
158 it = iter(seq)
159 it2 = iter(it)
160 self.assertTrue(it is it2)
161
162 # Test that for loops over iterators work
163 def test_iter_for_loop(self):

Callers

nothing calls this directly

Calls 2

assertTrueMethod · 0.95
listClass · 0.85

Tested by

no test coverage detected