MCPcopy Create free account
hub / github.com/celery/celery / myimp

Function myimp

t/unit/conftest.py:403–407  ·  view source on GitHub ↗
(name, *args, **kwargs)

Source from the content-addressed store, hash-verified

401 modnames = request.node.get_closest_marker("masked_modules").args
402
403 def myimp(name, *args, **kwargs):
404 if name in modnames:
405 raise ImportError('No module named %s' % name)
406 else:
407 return realimport(name, *args, **kwargs)
408
409 builtins.__import__ = myimp
410 try:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected