예제 #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]