test_solo.py 490 B

123456789101112131415161718192021
  1. from __future__ import absolute_import, unicode_literals
  2. import operator
  3. from celery.concurrency import solo
  4. from celery.utils.functional import noop
  5. class test_solo_TaskPool:
  6. def test_on_start(self):
  7. x = solo.TaskPool()
  8. x.on_start()
  9. def test_on_apply(self):
  10. x = solo.TaskPool()
  11. x.on_start()
  12. x.on_apply(operator.add, (2, 2), {}, noop, noop)
  13. def test_info(self):
  14. x = solo.TaskPool()
  15. x.on_start()
  16. assert x.info