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:
@@ -15,15 +15,15 @@ def brew_unknown_cmd2():
|
||||
|
||||
|
||||
def test_match(brew_unknown_cmd):
|
||||
assert match(Command('brew inst', stderr=brew_unknown_cmd), None)
|
||||
assert match(Command('brew inst', stderr=brew_unknown_cmd))
|
||||
for command in _brew_commands():
|
||||
assert not match(Command('brew ' + command), None)
|
||||
assert not match(Command('brew ' + command))
|
||||
|
||||
|
||||
def test_get_new_command(brew_unknown_cmd, brew_unknown_cmd2):
|
||||
assert get_new_command(Command('brew inst', stderr=brew_unknown_cmd),
|
||||
None) == ['brew list', 'brew install', 'brew uninstall']
|
||||
assert get_new_command(Command('brew inst', stderr=brew_unknown_cmd)) \
|
||||
== ['brew list', 'brew install', 'brew uninstall']
|
||||
|
||||
cmds = get_new_command(Command('brew instaa', stderr=brew_unknown_cmd2), None)
|
||||
cmds = get_new_command(Command('brew instaa', stderr=brew_unknown_cmd2))
|
||||
assert 'brew install' in cmds
|
||||
assert 'brew uninstall' in cmds
|
||||
|
Reference in New Issue
Block a user