Ask Solem 15 лет назад
Родитель
Сommit
8e2cb8d674
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      celery/contrib/test_runner.py

+ 9 - 0
celery/contrib/test_runner.py

@@ -6,5 +6,14 @@ Custom test runner to allow testing of celery delayed tasks.
 """
 
 def run_tests(test_labels, *args, **kwargs):
+    """Django test runner allowing testing of celery delayed tasks.
+
+    All tasks are run locally, not in a worker.
+
+    To use this runner set ``settings.TEST_RUNNER``::
+
+        TEST_RUNNER = "celery.contrib.test_runner.run_tests"
+
+    """
     settings.CELERY_ALWAYS_EAGER = True
     return run_tests_orig(test_labels, *args, **kwargs)