##// END OF EJS Templates
Merge my trunk-dev, with following mods:...
Merge my trunk-dev, with following mods: * cd completer: show bookmarks if no other completions are available. * Remove ipy_leo.py. "easy_install ipython-extension" to get it. (done to decouple it from ipython release cycle) * sh profile: easy way to give 'title' to prompt: assign to variable '_prompt_title'. It looks like this:: [~]|1> _prompt_title = 'sudo!' sudo![~]|2> * %rehashx: Aliases no longer contain dots. python3.0 binary will create alias python30. Fixes: #259716 "commands with dots in them don't work" * %cpaste: %cpaste -r repeats the last pasted block. The block is assigned to pasted_block even if code raises exception. * %edit: If you do '%edit pasted_block', pasted_block variable gets updated with new data (so repeated editing makes sense) Test mods: Add test_magic.py, with test_rehashx

File last commit:

r1735:8b145d5b
r1737:2a72a835 merge
Show More
test_magic.py
21 lines | 585 B | text/x-python | PythonLexer
""" Tests for various magic functions
Needs to be run by nose (to make ipython session available)
"""
def test_rehashx():
# clear up everything
_ip.IP.alias_table.clear()
del _ip.db['syscmdlist']
_ip.magic('rehashx')
# Practically ALL ipython development systems will have more than 10 aliases
assert len(_ip.IP.alias_table) > 10
for key, val in _ip.IP.alias_table.items():
# we must strip dots from alias names
assert '.' not in key
# rehashx must fill up syscmdlist
scoms = _ip.db['syscmdlist']
assert len(scoms) > 10