mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-19 03:32:31 +01:00
⚠️ Remove settings
param from rules match
, get_new_command
and side_effect
This commit is contained in:
@@ -110,14 +110,14 @@ def stderr(cmd):
|
||||
|
||||
|
||||
def test_match():
|
||||
assert match(Command('docker pes', stderr=stderr('pes')), None)
|
||||
assert match(Command('docker pes', stderr=stderr('pes')))
|
||||
|
||||
|
||||
@pytest.mark.parametrize('script, stderr', [
|
||||
('docker ps', ''),
|
||||
('cat pes', stderr('pes'))])
|
||||
def test_not_match(script, stderr):
|
||||
assert not match(Command(script, stderr=stderr), None)
|
||||
assert not match(Command(script, stderr=stderr))
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('docker_help')
|
||||
@@ -126,4 +126,4 @@ def test_not_match(script, stderr):
|
||||
('tags', ['tag', 'stats', 'images'])])
|
||||
def test_get_new_command(wrong, fixed):
|
||||
command = Command('docker {}'.format(wrong), stderr=stderr(wrong))
|
||||
assert get_new_command(command, None) == ['docker {}'.format(x) for x in fixed]
|
||||
assert get_new_command(command) == ['docker {}'.format(x) for x in fixed]
|
||||
|
Reference in New Issue
Block a user