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

Function test_module_without_init

tests/test_completerlib.py:171–185  ·  view source on GitHub ↗

Test module without __init__.py. https://github.com/ipython/ipython/issues/11226

()

Source from the content-addressed store, hash-verified

169
170
171def test_module_without_init():
172 """
173 Test module without __init__.py.
174
175 https://github.com/ipython/ipython/issues/11226
176 """
177 fake_module_name = "foo_xder_134"
178 with TemporaryDirectory() as tmpdir:
179 sys.path.insert(0, tmpdir)
180 try:
181 os.makedirs(os.path.join(tmpdir, fake_module_name))
182 s = try_import(mod=fake_module_name)
183 assert s == [], f"for module {fake_module_name}"
184 finally:
185 sys.path.remove(tmpdir)
186
187
188def test_valid_exported_submodules():

Callers

nothing calls this directly

Calls 2

try_importFunction · 0.90
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…