def testParallelReturnsAllResults(self, taskqueue, ndb): queue.parallel( task(Ok, 'ONE'), task(Ok, 'TWO') ).then(handler).run() consume(taskqueue) assert [["ONE", "TWO"]] == messages
def testParallel(self, taskqueue, ndb): queue.parallel( task(P, 'ONE'), task(P, 'TWO'), task(P, 'THREE') ).run() assert count_tasks(taskqueue) == 3 consume(taskqueue) assert 'ONE TWO THREE'.split() == messages
def testAbortParallel(self, taskqueue, fastndb): queue.parallel( task(P, 'ONE'), task(T), task(P, 'TWO') ).then(task(C)).run() consume(taskqueue) assert "ONE TWO".split() == messages assert [] == queue._Counter.query().fetch()
def testNestedParallel(self, taskqueue, ndb): queue.inorder( task(A), queue.parallel( queue.parallel(task(P, 'ONE'), task(P, 'TWO'), task(P, 'THREE')), task(B)), task(C) ).run() consume(taskqueue) assert "A B ONE TWO THREE C".split() == messages
def testCombined(self, taskqueue, fastndb): queue.inorder( task(A), queue.parallel(task(P, 'ONE'), task(P, 'TWO'), task(P, 'THREE')), task(B) ).run() consume(taskqueue) assert 'A ONE TWO THREE B'.split() == messages assert [] == queue._Counter.query().fetch()
def testTaskStr(self): print task(P, message='ONE') print queue.inorder(task(A), task(B)) print queue.parallel(task(A), task(B), task(P, message='ONE'))