1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 10:11:14 +00:00

#552: Fix code style

This commit is contained in:
Vladimir Iakovlev 2016-10-02 17:19:33 +02:00
parent cf352fd788
commit d05eb0a6dc
2 changed files with 5 additions and 1 deletions

View File

@ -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')])

View File

@ -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]