MCPcopy
hub / github.com/celery/celery / import_all_modules

Function import_all_modules

t/unit/conftest.py:330–343  ·  view source on GitHub ↗
(name=__name__, file=__file__,
                       skip=('celery.decorators',
                             'celery.task'))

Source from the content-addressed store, hash-verified

328
329
330def import_all_modules(name=__name__, file=__file__,
331 skip=('celery.decorators',
332 'celery.task')):
333 for module in find_distribution_modules(name, file):
334 if not module.startswith(skip):
335 try:
336 import_module(module)
337 except ImportError:
338 pass
339 except OSError as exc:
340 warnings.warn(UserWarning(
341 'Ignored error importing module {}: {!r}'.format(
342 module, exc,
343 )))
344
345
346@pytest.fixture

Callers 1

setup_sessionFunction · 0.85

Calls 2

formatMethod · 0.45

Tested by

no test coverage detected