mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 18:21:10 +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.types import Command
|
||||
|
||||
|
||||
no_suggestions = '''\
|
||||
ERROR: (gcloud) Command name argument expected.
|
||||
'''
|
||||
|
||||
|
||||
misspelled_command = '''\
|
||||
ERROR: (gcloud) Invalid choice: 'comute'.
|
||||
Usage: gcloud [optional flags] <group | command>
|
||||
@ -27,7 +25,6 @@ For detailed information on this command and its flags, run:
|
||||
gcloud --help
|
||||
'''
|
||||
|
||||
|
||||
misspelled_subcommand = '''\
|
||||
ERROR: (gcloud.compute) Invalid choice: 'instance'.
|
||||
Maybe you meant:
|
||||
@ -40,20 +37,15 @@ To search the help text of gcloud commands, run:
|
||||
gcloud help -- SEARCH_TERMS
|
||||
'''
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command', [
|
||||
Command('gcloud comute', misspelled_command),
|
||||
Command('gcloud compute instance list', misspelled_subcommand)])
|
||||
def test_match(command):
|
||||
assert match(command)
|
||||
|
||||
|
||||
def test_not_match():
|
||||
assert not match(Command('aws dynamodb invalid', no_suggestions))
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command, result', [
|
||||
(Command('gcloud comute', misspelled_command),
|
||||
['gcloud compute instances list']),
|
||||
|
Loading…
x
Reference in New Issue
Block a user