Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e48161 commit 8b145d5Copy full SHA for 8b145d5
1 file changed
IPython/tests/test_magic.py
@@ -0,0 +1,21 @@
1
+""" Tests for various magic functions
2
+
3
+Needs to be run by nose (to make ipython session available)
4
5
+"""
6
+def test_rehashx():
7
+ # clear up everything
8
+ _ip.IP.alias_table.clear()
9
+ del _ip.db['syscmdlist']
10
11
+ _ip.magic('rehashx')
12
+ # Practically ALL ipython development systems will have more than 10 aliases
13
14
+ assert len(_ip.IP.alias_table) > 10
15
+ for key, val in _ip.IP.alias_table.items():
16
+ # we must strip dots from alias names
17
+ assert '.' not in key
18
19
+ # rehashx must fill up syscmdlist
20
+ scoms = _ip.db['syscmdlist']
21
+ assert len(scoms) > 10
0 commit comments