Beispiel #1
0
    def test_generates_something(self):
        def generates_something():
            i = 0
            while True:
                yield i
                i += 1

        self.assert_iter_equal(head(generates(generates_something()), 4),
                               [0, 1, 2, 3])
Beispiel #2
0
    def test_generates_something(self):

        def generates_something():
            i = 0
            while True:
                yield i
                i += 1

        self.assert_iter_equal(head(generates(generates_something()), 4), [0, 1, 2, 3])
Beispiel #3
0
 def function(self, *args, **kw):
     return head(*args, **kw)
Beispiel #4
0
 def function(self, *args, **kw):
     return head(*args, **kw)