示例#1
0
def test_get_all_callables(*args):
    all_callables = get_all_callables()
    assert 'vim' in all_callables
    assert 'fsck' in all_callables
    assert 'f**k' not in all_callables
示例#2
0
文件: history.py 项目: ltype/thefuck
def _history_of_exists_without_current(command):
    callables = get_all_callables()
    return [line for line in get_history()
            if line != command.script
            and line.split(' ')[0] in callables]