diff --git a/tests/rules/test_fix_file.py b/tests/rules/test_fix_file.py index 46de1a2a..70921cb8 100644 --- a/tests/rules/test_fix_file.py +++ b/tests/rules/test_fix_file.py @@ -191,7 +191,7 @@ E NameError: name 'mocker' is not defined /home/thefuck/tests/rules/test_fix_file.py:218: NameError """, ''), -) +) # noqa @pytest.mark.parametrize('test', tests) @@ -239,7 +239,7 @@ def test_get_new_command_with_settings(mocker, monkeypatch, test, settings): if test[3]: assert (get_new_command(cmd) == - u'dummy_editor {} +{}:{} && {}'.format(test[1], test[2], test[3], test[0])) + u'dummy_editor {} +{}:{} && {}'.format(test[1], test[2], test[3], test[0])) else: assert (get_new_command(cmd) == - u'dummy_editor {} +{} && {}'.format(test[1], test[2], test[0])) + u'dummy_editor {} +{} && {}'.format(test[1], test[2], test[0])) diff --git a/tests/rules/test_has_exists_script.py b/tests/rules/test_has_exists_script.py index c6b4b1ed..7ddb7b89 100644 --- a/tests/rules/test_has_exists_script.py +++ b/tests/rules/test_has_exists_script.py @@ -7,7 +7,7 @@ def test_match(): with patch('os.path.exists', return_value=True): assert match(Command(script='main', stderr='main: command not found')) assert match(Command(script='main --help', - stderr='main: command not found')) + stderr='main: command not found')) assert not match(Command(script='main', stderr='')) with patch('os.path.exists', return_value=False): diff --git a/tests/rules/test_unknown_command.py b/tests/rules/test_unknown_command.py index 9a2d37e7..7e7f9aa7 100644 --- a/tests/rules/test_unknown_command.py +++ b/tests/rules/test_unknown_command.py @@ -23,12 +23,12 @@ def test_not_match(command): @pytest.mark.parametrize('command, new_command', [ (Command('hdfs dfs ls', - stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['hdfs dfs -ls']), + stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['hdfs dfs -ls']), (Command('hdfs dfs rm /foo/bar', - stderr='rm: Unknown command\nDid you mean -rm? This command begins with a dash.'), ['hdfs dfs -rm /foo/bar']), + stderr='rm: Unknown command\nDid you mean -rm? This command begins with a dash.'), ['hdfs dfs -rm /foo/bar']), (Command('./bin/hdfs dfs ls -R /foo/bar', - stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['./bin/hdfs dfs -ls -R /foo/bar']), + stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['./bin/hdfs dfs -ls -R /foo/bar']), (Command('./bin/hdfs dfs -Dtest=fred ls -R /foo/bar', - stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['./bin/hdfs dfs -Dtest=fred -ls -R /foo/bar'])]) + stderr='ls: Unknown command\nDid you mean -ls? This command begins with a dash.'), ['./bin/hdfs dfs -Dtest=fred -ls -R /foo/bar'])]) def test_get_new_command(command, new_command): assert get_new_command(command) == new_command diff --git a/tests/rules/test_vagrant_up.py b/tests/rules/test_vagrant_up.py index 19d7b335..4319eed6 100644 --- a/tests/rules/test_vagrant_up.py +++ b/tests/rules/test_vagrant_up.py @@ -27,8 +27,8 @@ def test_not_match(command): (Command(script='vagrant ssh', stderr='VM must be running to open SSH connection. Run `vagrant up`\nto start the virtual machine.'), 'vagrant up && vagrant ssh'), (Command(script='vagrant ssh devbox', stderr='VM must be running to open SSH connection. Run `vagrant up`\nto start the virtual machine.'), ['vagrant up devbox && vagrant ssh devbox', 'vagrant up && vagrant ssh devbox']), (Command(script='vagrant rdp', - stderr='VM must be created before running this command. Run `vagrant up` first.'), 'vagrant up && vagrant rdp'), + stderr='VM must be created before running this command. Run `vagrant up` first.'), 'vagrant up && vagrant rdp'), (Command(script='vagrant rdp devbox', - stderr='VM must be created before running this command. Run `vagrant up` first.'), ['vagrant up devbox && vagrant rdp devbox', 'vagrant up && vagrant rdp devbox'])]) + stderr='VM must be created before running this command. Run `vagrant up` first.'), ['vagrant up devbox && vagrant rdp devbox', 'vagrant up && vagrant rdp devbox'])]) def test_get_new_command(command, new_command): assert get_new_command(command) == new_command diff --git a/thefuck/rules/git_pull_uncommitted_changes.py b/thefuck/rules/git_pull_uncommitted_changes.py index 8e9a640d..3a8be31a 100644 --- a/thefuck/rules/git_pull_uncommitted_changes.py +++ b/thefuck/rules/git_pull_uncommitted_changes.py @@ -6,7 +6,7 @@ from thefuck.specific.git import git_support def match(command): return ('pull' in command.script and ('You have unstaged changes' in command.stderr - or 'contains uncommitted changes' in command.stderr)) + or 'contains uncommitted changes' in command.stderr)) @git_support