def chaincomplex(self): c = ( add.s(2, 2) | ( add.s(4) | add.s(8) | add.s(16) ) | group(add.s(i) for i in range(4)) ) res = c() assert_equal(res.get(), [32, 33, 34, 35])
def test_complex_chain(self, manager): c = ( add.s(2, 2) | ( add.s(4) | add.s(8) | add.s(16) ) | group(add.s(i) for i in range(4)) ) res = c() assert res.get() == [32, 33, 34, 35]
def _evil_groupmember(self, evil_t, *eargs, **opts): g1 = group(add.s(2, 2).set(**opts), evil_t.s(*eargs).set(**opts), add.s(4, 4).set(**opts), add.s(8, 8).set(**opts)) g2 = group(add.s(3, 3).set(**opts), add.s(5, 5).set(**opts), evil_t.s(*eargs).set(**opts), add.s(7, 7).set(**opts)) self.join(g1(), timeout=10) self.join(g2(), timeout=10)
def _evil_groupmember(self, evil_t, *eargs, **opts): g1 = group(add.s(2, 2).set(**opts), evil_t.s(*eargs).set(**opts), add.s(4, 4).set(**opts), add.s(8, 8).set(**opts)) g2 = group(add.s(3, 3).set(**opts), add.s(5, 5).set(**opts), evil_t.s(*eargs).set(**opts), add.s(7, 7).set(**opts)) self.join(g1(), timeout=10) self.join(g2(), timeout=10)
def manyshort(self): self.join(group(add.s(i, i) for i in range(1000))(), timeout=10, propagate=True)
def chain(self): c = add.s(4, 4) | add.s(8) | add.s(16) assert_equal(self.join(c()), 32)
def manyshort(self): self.join(group(add.s(i, i) for i in range(1000))(), timeout=10, propagate=True)
def test_simple_chain(self, manager): c = add.s(4, 4) | add.s(8) | add.s(16) assert manager.join(c()) == 32