1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-29 16:42:30 +01:00

⚠️ Remove settings param from rules match, get_new_command and side_effect

This commit is contained in:
nvbn
2015-09-07 13:00:29 +03:00
parent 382eb8b86c
commit df4d2cc88d
154 changed files with 535 additions and 465 deletions

View File

@@ -14,11 +14,11 @@ from tests.utils import Command
('You don\'t have access to the history DB.', ''),
('', "error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/ipaddr.py'")])
def test_match(stderr, stdout):
assert match(Command(stderr=stderr, stdout=stdout), None)
assert match(Command(stderr=stderr, stdout=stdout))
def test_not_match():
assert not match(Command(), None)
assert not match(Command())
@pytest.mark.parametrize('before, after', [
@@ -26,4 +26,4 @@ def test_not_match():
('echo a > b', 'sudo sh -c "echo a > b"'),
('echo "a" >> b', 'sudo sh -c "echo \\"a\\" >> b"')])
def test_get_new_command(before, after):
assert get_new_command(Command(before), None) == after
assert get_new_command(Command(before)) == after