MCPcopy Create free account
hub / github.com/ipython/ipython / test_rehashx

Function test_rehashx

IPython/core/tests/test_magic.py:136–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 "'TerminalInteractiveShell.* options'")
135
136def test_rehashx():
137 # clear up everything
138 _ip.alias_manager.clear_aliases()
139 del _ip.db['syscmdlist']
140
141 _ip.magic('rehashx')
142 # Practically ALL ipython development systems will have more than 10 aliases
143
144 nt.assert_true(len(_ip.alias_manager.aliases) > 10)
145 for name, cmd in _ip.alias_manager.aliases:
146 # we must strip dots from alias names
147 nt.assert_not_in('.', name)
148
149 # rehashx must fill up syscmdlist
150 scoms = _ip.db['syscmdlist']
151 nt.assert_true(len(scoms) > 10)
152
153
154

Callers

nothing calls this directly

Calls 2

clear_aliasesMethod · 0.80
magicMethod · 0.45

Tested by

no test coverage detected