##// END OF EJS Templates
add test_magic, with single test (for rehashx)
Ville M. Vainio -
Show More
@@ -0,0 +1,21 b''
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
General Comments 0
You need to be logged in to leave comments. Login now