Exemple #1
0
def test_pipeline():
    funcs = [
        lambda x: x+1,
        lambda x: x+2,
        lambda x: x+3,
    ]
    assert pipeline(0, funcs) == 6
    assert pipeline(1, funcs) == 7
Exemple #2
0
def test_pipeline():
    funcs = [
        lambda x: x + 1,
        lambda x: x + 2,
        lambda x: x + 3,
    ]
    assert pipeline(0, funcs) == 6
    assert pipeline(1, funcs) == 7
Exemple #3
0
 def __call__(self, data):
     fns = [p.func for p in self.prev] + [self.func]
     return pipeline(data, fns)
Exemple #4
0
 def __call__(self, data):
     fns = [p.func for p in self.prev] + [self.func]
     return pipeline(data, fns)