def test_get_all_matched_commands(stderr, result): assert list(get_all_matched_commands(stderr)) == result
def get_new_command(command, settings): broken_cmd = re.findall(r"'([^']*)' is not a task", command.stderr)[0] new_cmds = get_all_matched_commands(command.stderr, 'Did you mean this?') return replace_command(command, broken_cmd, new_cmds)
def get_new_command(command): broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command', command.stderr)[0] return replace_command(command, broken_cmd, get_all_matched_commands(command.stderr))
def get_new_command(command, settings): broken_cmd = re.findall(r"git: '([^']*)' is not a git command", command.stderr)[0] matched = get_all_matched_commands(command.stderr) return replace_command(command, broken_cmd, matched)
def get_new_command(command): broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command', command.output)[0] return replace_command(command, broken_cmd, get_all_matched_commands(command.output))
def get_new_command(command, settings): broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command', command.stderr)[0] new_cmd = get_closest(broken_cmd, get_all_matched_commands(command.stderr)) return replace_argument(command.script, broken_cmd, new_cmd)
def get_new_command(command): broken_cmd = re.findall(r"git: '([^']*)' is not a git command", command.stderr)[0] matched = get_all_matched_commands( command.stderr, ['The most similar command', 'Did you mean']) return replace_command(command, broken_cmd, matched)
def get_new_command(command): broken_cmd = re.findall(r"git: '([^']*)' is not a git command", command.stderr)[0] matched = get_all_matched_commands(command.stderr, ['The most similar command', 'Did you mean']) return replace_command(command, broken_cmd, matched)
def get_new_command(command, settings): broken_cmd = re.findall(r'tsuru: "([^"]*)" is not a tsuru command', command.stderr)[0] return replace_command(command, broken_cmd, get_all_matched_commands(command.stderr))
def get_new_command(command): broken_cmd = re.findall(r'Error: unknown command "([^"]*)" for "git-lfs"', command.output)[0] matched = get_all_matched_commands(command.output, ['Did you mean', ' for usage.']) return replace_command(command, broken_cmd, matched)
def get_new_command(command): broken_cmd = re.findall(r"'([^']*)' is not a task", command.output)[0] new_cmds = get_all_matched_commands(command.output, "Did you mean this?") return replace_command(command, broken_cmd, new_cmds)
def get_new_command(command, settings): broken_cmd = re.findall(r"git: '([^']*)' is not a git command", command.stderr)[0] new_cmd = get_closest(broken_cmd, get_all_matched_commands(command.stderr)) return replace_argument(command.script, broken_cmd, new_cmd)