mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-07 21:51:30 +00:00
Remove duplicate blank lines
This commit is contained in:
parent
a4cb9f6909
commit
98abbf6703
@ -3,12 +3,10 @@ import pytest
|
|||||||
from thefuck.rules.gcloud_cli import match, get_new_command
|
from thefuck.rules.gcloud_cli import match, get_new_command
|
||||||
from thefuck.types import Command
|
from thefuck.types import Command
|
||||||
|
|
||||||
|
|
||||||
no_suggestions = '''\
|
no_suggestions = '''\
|
||||||
ERROR: (gcloud) Command name argument expected.
|
ERROR: (gcloud) Command name argument expected.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
misspelled_command = '''\
|
misspelled_command = '''\
|
||||||
ERROR: (gcloud) Invalid choice: 'comute'.
|
ERROR: (gcloud) Invalid choice: 'comute'.
|
||||||
Usage: gcloud [optional flags] <group | command>
|
Usage: gcloud [optional flags] <group | command>
|
||||||
@ -27,7 +25,6 @@ For detailed information on this command and its flags, run:
|
|||||||
gcloud --help
|
gcloud --help
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
misspelled_subcommand = '''\
|
misspelled_subcommand = '''\
|
||||||
ERROR: (gcloud.compute) Invalid choice: 'instance'.
|
ERROR: (gcloud.compute) Invalid choice: 'instance'.
|
||||||
Maybe you meant:
|
Maybe you meant:
|
||||||
@ -40,20 +37,15 @@ To search the help text of gcloud commands, run:
|
|||||||
gcloud help -- SEARCH_TERMS
|
gcloud help -- SEARCH_TERMS
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('command', [
|
@pytest.mark.parametrize('command', [
|
||||||
Command('gcloud comute', misspelled_command),
|
Command('gcloud comute', misspelled_command),
|
||||||
Command('gcloud compute instance list', misspelled_subcommand)])
|
Command('gcloud compute instance list', misspelled_subcommand)])
|
||||||
def test_match(command):
|
def test_match(command):
|
||||||
assert match(command)
|
assert match(command)
|
||||||
|
|
||||||
|
|
||||||
def test_not_match():
|
def test_not_match():
|
||||||
assert not match(Command('aws dynamodb invalid', no_suggestions))
|
assert not match(Command('aws dynamodb invalid', no_suggestions))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('command, result', [
|
@pytest.mark.parametrize('command, result', [
|
||||||
(Command('gcloud comute', misspelled_command),
|
(Command('gcloud comute', misspelled_command),
|
||||||
['gcloud compute instances list']),
|
['gcloud compute instances list']),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user