diff --git a/tests/rules/test_remove_trailing_cedilla.py b/tests/rules/test_remove_trailing_cedilla.py index 481d471..377ff8f 100644 --- a/tests/rules/test_remove_trailing_cedilla.py +++ b/tests/rules/test_remove_trailing_cedilla.py @@ -1,18 +1,15 @@ -# -*- coding: utf-8 -*- - import pytest -from thefuck.rules.remove_trailing_cedilla import match, get_new_command +from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA from tests.utils import Command @pytest.mark.parametrize('command', [ - Command(script='wrongç'), - Command(script='wrong with argsç')]) - + 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ç'), 'wrong'), - (Command('wrong with argsç'), 'wrong with args')]) + (Command('wrong' + CEDILLA), 'wrong'), + (Command('wrong with args' + CEDILLA), 'wrong with args')]) def test_get_new_command(command, new_command): assert get_new_command(command) == new_command diff --git a/thefuck/rules/remove_trailing_cedilla.py b/thefuck/rules/remove_trailing_cedilla.py index 15124fa..3118644 100644 --- a/thefuck/rules/remove_trailing_cedilla.py +++ b/thefuck/rules/remove_trailing_cedilla.py @@ -1,8 +1,9 @@ -# -*- coding: utf-8 -*- +# encoding=utf8 + +CEDILLA = u"ç" def match(command): - return command.script.endswith('ç') + return command.script.endswith(CEDILLA) def get_new_command(command): return command.script[:-1] -