test_magic.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:yatta_reader 作者: sound88 项目源码 文件源码
def test_rehashx():
    # clear up everything
    _ip.alias_manager.clear_aliases()
    del _ip.db['syscmdlist']

    _ip.magic('rehashx')
    # Practically ALL ipython development systems will have more than 10 aliases

    nt.assert_true(len(_ip.alias_manager.aliases) > 10)
    for name, cmd in _ip.alias_manager.aliases:
        # we must strip dots from alias names
        nt.assert_not_in('.', name)

    # rehashx must fill up syscmdlist
    scoms = _ip.db['syscmdlist']
    nt.assert_true(len(scoms) > 10)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号