MCPcopy Index your code
hub / github.com/RustPython/RustPython / hook

Function hook

Lib/test/test_importlib/util.py:392–395  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

390def mock_path_hook(*entries, importer):
391 """A mock sys.path_hooks entry."""
392 def hook(entry):
393 if entry not in entries:
394 raise ImportError
395 return importer
396 return hook
397
398

Callers 5

invoke_excepthookFunction · 0.85
_path_hooksMethod · 0.85
panic_hookFunction · 0.85
_path_hooksMethod · 0.85
initialize_main_vmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected