Debian Codegraph @

pypy/objspace/std/test/test_proxy_iter.py

raw symbols SCIP
1
2 """ test of iterators
3 """
4
5 from pypy.objspace.std.test.test_proxy_internals import AppProxy
6
7 class AppTestProxyIter(AppProxy):
8 def test_generator(self):
9 def some(l):
10 for i in l:
11 yield i
12
13 g = self.get_proxy(some([1,2,3]))
14 assert list(g) == [1,2,3]
15 g = self.get_proxy(some([1,2,3]))
16 assert next(g) == 1
17 assert next(g) == 2