MCPcopy Create free account
hub / github.com/Pylons/webtest / MockIterator

Class MockIterator

tests/test_lint.py:245–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243class TestIteratorWrapper(unittest.TestCase):
244 def test_close(self):
245 class MockIterator:
246
247 def __init__(self):
248 self.closed = False
249
250 def __iter__(self):
251 return self
252
253 def __next__(self):
254 return None
255
256 next = __next__
257
258 def close(self):
259 self.closed = True
260
261 mock = MockIterator()
262 wrapper = IteratorWrapper(mock, None)

Callers 1

test_closeMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_closeMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…