Пример #1
0
 def test_dmap_async(self):
     from celery import conf
     import operator
     conf.ALWAYS_EAGER = True
     res = task.dmap_async(operator.add, zip(xrange(10), xrange(10)))
     self.assertEqual(sum(res.get()), sum(operator.add(x, x)
                                             for x in xrange(10)))
     conf.ALWAYS_EAGER = False
Пример #2
0
 def test_dmap_async(self):
     import operator
     res = task.dmap_async(operator.add, zip(xrange(10), xrange(10)))
     self.assertEqual(sum(res.get()), sum(operator.add(x, x)
                                         for x in xrange(10)))
Пример #3
0
 def test_dmap_async(self):
     import operator
     res = task.dmap_async(operator.add, zip(xrange(10), xrange(10)))
     self.assertEqual(sum(res.get()),
                      sum(operator.add(x, x) for x in xrange(10)))