(scope='session')
| 266 | |
| 267 | |
| 268 | def 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 | |
| 287 | def teardown(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…