@pytest.fixture(scope=u'session')
def celery_session_app(request, celery_config, celery_parameters, celery_enable_logging, use_celery_app_trap):
 mark = request.node.get_marker(u'celery')
 config = dict(celery_config, **(mark.kwargs if mark else {}))
 with _create_app(request, enable_logging=celery_enable_logging, use_trap=use_celery_app_trap, parameters=celery_parameters, **config) as app:
  if (not use_celery_app_trap):
   app.set_default()
   app.set_current()
  (yield app)

@ pytest . fixture ( scope = u'session' ) def celery_session_app ( request , celery_config , celery_parameters , celery_enable_logging , use_celery_app_trap ) : mark = request . node . get_marker ( u'celery' ) config = dict ( celery_config , ** ( mark . kwargs if mark else { } ) ) with _create_app ( request , enable_logging = celery_enable_logging , use_trap = use_celery_app_trap , parameters = celery_parameters , ** config ) as app : if ( not use_celery_app_trap ) : app . set_default ( ) app . set_current ( ) ( yield app )
session fixture: return app for session fixtures .