1
0
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:
nvbn
2015-09-07 13:00:29 +03:00
parent 382eb8b86c
commit df4d2cc88d
154 changed files with 535 additions and 465 deletions

View File

@@ -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]