Exemplo n.º 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()
Exemplo n.º 2
0
 def test_info(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     try:
         assert x.info
     finally:
         x.stop()
Exemplo n.º 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)
Exemplo n.º 4
0
 def test_info(self):
     from celery.concurrency import thread
     x = thread.TaskPool()
     assert x.info