1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-12 06:44:03 +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

@@ -9,9 +9,10 @@ from tests.utils import Command
"19:23:25.470911 git.c:282 trace: alias expansion: com => 'commit' '--verbose'")])
def test_git_support(called, command, stderr):
@git_support
def fn(command, settings): return command.script
def fn(command):
return command.script
assert fn(Command(script=called, stderr=stderr), None) == command
assert fn(Command(script=called, stderr=stderr)) == command
@pytest.mark.parametrize('command, is_git', [
@@ -24,6 +25,7 @@ def test_git_support(called, command, stderr):
('cat hub', False)])
def test_git_support_match(command, is_git):
@git_support
def fn(command, settings): return True
def fn(command):
return True
assert fn(Command(script=command), None) == is_git
assert fn(Command(script=command)) == is_git