test_completer.py 文件源码

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

项目:leetcode 作者: thomasyimgit 项目源码 文件源码
def test_magic_color():
    ip = get_ipython()
    c = ip.Completer

    s, matches = c.complete(None, 'colo')
    nt.assert_in('%colors', matches)
    s, matches = c.complete(None, 'colo')
    nt.assert_not_in('NoColor', matches)
    s, matches = c.complete(None, 'colors ')
    nt.assert_in('NoColor', matches)
    s, matches = c.complete(None, '%colors ')
    nt.assert_in('NoColor', matches)
    s, matches = c.complete(None, 'colors NoCo')
    nt.assert_list_equal(['NoColor'], matches)
    s, matches = c.complete(None, '%colors NoCo')
    nt.assert_list_equal(['NoColor'], matches)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号