mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-02 10:02:33 +01:00
⚠️ Remove settings
param from rules match
, get_new_command
and side_effect
This commit is contained in:
@@ -9,17 +9,17 @@ from tests.utils import Command
|
||||
stderr='cd: foo: No such file or directory'),
|
||||
Command(script='cd foo/bar/baz', stderr='cd: can\'t cd to foo/bar/baz')])
|
||||
def test_match(command):
|
||||
assert match(command, None)
|
||||
assert match(command)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command', [
|
||||
Command(script='cd foo', stderr=''), Command()])
|
||||
def test_not_match(command):
|
||||
assert not match(command, None)
|
||||
assert not match(command)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('command, new_command', [
|
||||
(Command('cd foo'), 'mkdir -p foo && cd foo'),
|
||||
(Command('cd foo/bar/baz'), 'mkdir -p foo/bar/baz && cd foo/bar/baz')])
|
||||
def test_get_new_command(command, new_command):
|
||||
assert get_new_command(command, None) == new_command
|
||||
assert get_new_command(command) == new_command
|
||||
|
Reference in New Issue
Block a user