MCPcopy
hub / github.com/celery/celery / setup_session

Function setup_session

t/unit/conftest.py:268–284  ·  view source on GitHub ↗
(scope='session')

Source from the content-addressed store, hash-verified

266
267
268def setup_session(scope='session'):
269 using_coverage = (
270 os.environ.get('COVER_ALL_MODULES') or '--with-coverage' in sys.argv
271 )
272 os.environ.update(
273 # warn if config module not found
274 C_WNOCONF='yes',
275 KOMBU_DISABLE_LIMIT_PROTECTION='yes',
276 )
277
278 if using_coverage and not PYPY3:
279 from warnings import catch_warnings
280 with catch_warnings(record=True):
281 import_all_modules()
282 warnings.resetwarnings()
283 from celery._state import set_default_app
284 set_default_app(Trap())
285
286
287def teardown():

Callers

nothing calls this directly

Calls 5

set_default_appFunction · 0.90
TrapClass · 0.90
import_all_modulesFunction · 0.85
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…