mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-31 02:01:13 +00:00
#552: Fix code style
This commit is contained in:
parent
cf352fd788
commit
d05eb0a6dc
@ -2,12 +2,14 @@ import pytest
|
||||
from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA
|
||||
from tests.utils import Command
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command', [
|
||||
Command(script='wrong' + CEDILLA),
|
||||
Command(script='wrong with args' + CEDILLA)])
|
||||
def test_match(command):
|
||||
assert match(command)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command, new_command', [
|
||||
(Command('wrong' + CEDILLA), 'wrong'),
|
||||
(Command('wrong with args' + CEDILLA), 'wrong with args')])
|
||||
|
@ -1,9 +1,11 @@
|
||||
# encoding=utf8
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
CEDILLA = u"ç"
|
||||
|
||||
|
||||
def match(command):
|
||||
return command.script.endswith(CEDILLA)
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
return command.script[:-1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user