MCPcopy Index your code
hub / github.com/ipython/ipython / test_import_denier

Function test_import_denier

tests/test_qt_loaders.py:6–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def test_import_denier():
7 ID.forbid("ipython_denied_module")
8 with pytest.raises(ImportError, match="disabled by IPython"):
9 import ipython_denied_module
10 with pytest.raises(ImportError, match="disabled by IPython"):
11 importlib.import_module("ipython_denied_module")

Callers

nothing calls this directly

Calls 1

forbidMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…