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

Function test_bad_module_all

tests/test_completerlib.py:150–168  ·  view source on GitHub ↗

Test module with invalid __all__ https://github.com/ipython/ipython/issues/9678

()

Source from the content-addressed store, hash-verified

148
149
150def test_bad_module_all():
151 """Test module with invalid __all__
152
153 https://github.com/ipython/ipython/issues/9678
154 """
155 testsdir = os.path.dirname(__file__)
156 sys.path.insert(0, testsdir)
157 try:
158 results = module_completion("from bad_all import ")
159 assert "puppies" in results
160 for r in results:
161 assert isinstance(r, str)
162
163 # bad_all doesn't contain submodules, but this completion
164 # should finish without raising an exception:
165 results = module_completion("import bad_all.")
166 assert results == []
167 finally:
168 sys.path.remove(testsdir)
169
170
171def test_module_without_init():

Callers

nothing calls this directly

Calls 2

module_completionFunction · 0.90
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…