Testing Trailing Cedilla Character Removal in TheFuck Command Handler
This test suite validates the functionality of the remove_trailing_cedilla rule in TheFuck project, which handles commands containing trailing cedilla characters. The tests ensure proper detection and removal of cedilla characters from command strings.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
nvbn/thefuck
tests/rules/test_remove_trailing_cedilla.py
import pytest
from thefuck.rules.remove_trailing_cedilla import match, get_new_command, CEDILLA
from thefuck.types import Command
@pytest.mark.parametrize('command', [
Command('wrong' + CEDILLA, ''),
Command('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')])
def test_get_new_command(command, new_command):
assert get_new_command(command) == new_command