@pytest.fixture(scope=u'session')
def celery_session_worker(request, celery_session_app, celery_includes, celery_worker_pool, celery_worker_parameters):
 if (not NO_WORKER):
  for module in celery_includes:
   celery_session_app.loader.import_task_module(module)
  with worker.start_worker(celery_session_app, pool=celery_worker_pool, **celery_worker_parameters) as w:
   (yield w)

@ pytest . fixture ( scope = u'session' ) def celery_session_worker ( request , celery_session_app , celery_includes , celery_worker_pool , celery_worker_parameters ) : if ( not NO_WORKER ) : for module in celery_includes : celery_session_app . loader . import_task_module ( module ) with worker . start_worker ( celery_session_app , pool = celery_worker_pool , ** celery_worker_parameters ) as w : ( yield w )
session fixture: start worker that lives throughout test suite .