Пример #1
0
 def test_on_apply(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     try:
         x.on_apply(operator.add, (2, 2), {}, noop, noop)
     finally:
         x.stop()
Пример #2
0
 def test_info(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     try:
         assert x.info
     finally:
         x.stop()
Пример #3
0
 def test_on_stop(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     x.on_stop()
     with pytest.raises(RuntimeError):
         x.on_apply(operator.add, (2, 2), {}, noop, noop)
Пример #4
0
 def test_info(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     assert x.info