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

Function test_rehashx

tests/test_magic.py:156–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155
156def test_rehashx():
157 # clear up everything
158 _ip.alias_manager.clear_aliases()
159 del _ip.db["syscmdlist"]
160
161 _ip.run_line_magic("rehashx", "")
162 # Practically ALL ipython development systems will have more than 10 aliases
163
164 assert len(_ip.alias_manager.aliases) > 10
165 for name, cmd in _ip.alias_manager.aliases:
166 # we must strip dots from alias names
167 assert "." not in name
168
169 # rehashx must fill up syscmdlist
170 scoms = _ip.db["syscmdlist"]
171 assert len(scoms) > 10
172
173
174def test_magic_parse_options():

Callers

nothing calls this directly

Calls 2

clear_aliasesMethod · 0.80
run_line_magicMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…