1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-06-26 02:03:33 +01:00

: Unify work with output in classic and instant mode

This commit is contained in:
Vladimir Iakovlev
2017-08-31 17:58:56 +02:00
parent 96843fc6cd
commit 4625d8503d
237 changed files with 1322 additions and 1332 deletions
tests
rules
test_ag_literal.pytest_apt_get.pytest_apt_get_search.pytest_apt_invalid_operation.pytest_aws_cli.pytest_brew_install.pytest_brew_link.pytest_brew_uninstall.pytest_brew_unknown_command.pytest_brew_update_formula.pytest_brew_upgrade.pytest_cargo_no_command.pytest_cd_mkdir.pytest_cd_parent.pytest_chmod_x.pytest_composer_not_command.pytest_cp_omitting_directory.pytest_dirty_untar.pytest_dirty_unzip.pytest_django_south_ghost.pytest_django_south_merge.pytest_docker_not_command.pytest_dry.pytest_fab_command_not_found.pytest_fix_alt_space.pytest_fix_file.pytest_gem_unknown_command.pytest_git_add.pytest_git_add_force.pytest_git_bisect_usage.pytest_git_branch_delete.pytest_git_branch_exists.pytest_git_branch_list.pytest_git_checkout.pytest_git_diff_no_index.pytest_git_diff_staged.pytest_git_fix_stash.pytest_git_flag_after_filename.pytest_git_help_aliased.pytest_git_not_command.pytest_git_pull.pytest_git_pull_clone.pytest_git_pull_uncommitted_changes.pytest_git_pull_unstaged_changes.pytest_git_push.pytest_git_push_force.pytest_git_push_pull.pytest_git_push_without_commits.pytest_git_rebase_merge_dir.pytest_git_rebase_no_changes.pytest_git_remote_seturl_add.pytest_git_rm_local_modifications.pytest_git_rm_recursive.pytest_git_rm_staged.pytest_git_stash.pytest_git_stash_pop.pytest_git_tag_force.pytest_git_two_dashes.pytest_go_run.pytest_gradle_not_task.pytest_gradle_wrapper.pytest_grep_arguments_order.pytest_grep_recursive.pytest_grunt_task_not_found.pytest_gulp_not_task.pytest_has_exists_script.pytest_heroku_not_command.pytest_history.pytest_hostscli.pytest_ifconfig_device_not_found.pytest_java.pytest_javac.pytest_lein_not_task.pytest_ln_no_hard_link.pytest_ln_s_order.pytest_ls_all.pytest_ls_lah.pytest_man.pytest_man_no_space.pytest_mercurial.pytest_missing_space_before_subcommand.pytest_mkdir_p.pytest_mvn_no_command.pytest_mvn_unknown_lifecycle_phase.pytest_no_command.pytest_no_such_file.pytest_npm_missing_script.pytest_npm_run_script.pytest_npm_wrong_command.pytest_open.pytest_pacman.pytest_pacman_not_found.pytest_path_from_history.pytest_pip_unknown_command.pytest_port_already_in_use.pytest_python_command.pytest_python_execute.pytest_quotation_marks.pytest_react_native_command_unrecognized.pytest_remove_trailing_cedilla.pytest_rm_dir.pytest_rm_root.pytest_scm_correction.pytest_sed_unterminated_s.pytest_sl_ls.pytest_ssh_known_host.pytest_sudo.pytest_sudo_command_from_user_path.pytest_switch_lang.pytest_systemctl.pytest_tmux.pytest_touch.pytest_tsuru_login.pytest_tsuru_not_command.pytest_unknown_command.pytest_vagrant_up.pytest_whois.pytest_workon_doesnt_exists.pytest_yarn_alias.pytest_yarn_command_not_found.pytest_yarn_command_replaced.pytest_yarn_help.py
specific
test_corrector.pytest_types.pytest_utils.pyutils.py
thefuck
output_readers
rules
ag_literal.pyapt_get.pyapt_invalid_operation.pyaws_cli.pybrew_install.pybrew_link.pybrew_uninstall.pybrew_unknown_command.pybrew_update_formula.pycargo_no_command.pycd_correction.pycd_mkdir.pychmod_x.pycomposer_not_command.pycp_omitting_directory.pycpp11.pydjango_south_ghost.pydjango_south_merge.pydocker_not_command.pyfab_command_not_found.pyfix_alt_space.pyfix_file.pygem_unknown_command.pygit_add.pygit_add_force.pygit_bisect_usage.pygit_branch_delete.pygit_branch_exists.pygit_checkout.pygit_diff_no_index.pygit_fix_stash.pygit_flag_after_filename.pygit_help_aliased.pygit_not_command.pygit_pull.pygit_pull_clone.pygit_pull_uncommitted_changes.pygit_push.pygit_push_force.pygit_push_pull.pygit_push_without_commits.pygit_rebase_merge_dir.pygit_rebase_no_changes.pygit_remote_seturl_add.pygit_rm_local_modifications.pygit_rm_recursive.pygit_rm_staged.pygit_stash.pygit_stash_pop.pygit_tag_force.pygit_two_dashes.pygradle_no_task.pygradle_wrapper.pygrep_arguments_order.pygrep_recursive.pygrunt_task_not_found.pygulp_not_task.pyhas_exists_script.pyheroku_not_command.pyhostscli.pyifconfig_device_not_found.pylein_not_task.pyln_no_hard_link.pyln_s_order.pyls_all.pyman.pyman_no_space.pymercurial.pymkdir_p.pymvn_no_command.pymvn_unknown_lifecycle_phase.pyno_command.pyno_such_file.pynpm_missing_script.pynpm_run_script.pynpm_wrong_command.pyopen.pypacman.pypacman_not_found.pypath_from_history.pypip_unknown_command.pyport_already_in_use.pypython_command.pyreact_native_command_unrecognized.pyrm_dir.pyrm_root.pyscm_correction.pysed_unterminated_s.pyssh_known_hosts.pysudo.pysudo_command_from_user_path.pyswitch_lang.pysystemctl.pytest.py.pytmux.pytouch.pytsuru_login.pytsuru_not_command.pyunknown_command.pyvagrant_up.pyyarn_alias.pyyarn_command_not_found.pyyarn_command_replaced.pyyarn_help.py
specific
types.py

@ -1,12 +1,12 @@
from thefuck.rules.python_command import match, get_new_command
from tests.utils import Command
from thefuck.types import Command
def test_match():
assert match(Command('temp.py', stderr='Permission denied'))
assert not match(Command())
assert match(Command('temp.py', 'Permission denied'))
assert not match(Command('', ''))
def test_get_new_command():
assert (get_new_command(Command('./test_sudo.py'))
assert (get_new_command(Command('./test_sudo.py', ''))
== 'python ./test_sudo.py')