mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 19:22:32 +01:00
#209 add support of aliases to no_command
This commit is contained in:
@@ -3,7 +3,7 @@ from thefuck.rules.no_command import match, get_new_command
|
||||
|
||||
|
||||
def test_match():
|
||||
with patch('thefuck.rules.no_command._get_all_bins',
|
||||
with patch('thefuck.rules.no_command._get_all_callables',
|
||||
return_value=['vim', 'apt-get']):
|
||||
assert match(Mock(stderr='vom: not found', script='vom file.py'), None)
|
||||
assert not match(Mock(stderr='qweqwe: not found', script='qweqwe'), None)
|
||||
@@ -11,7 +11,7 @@ def test_match():
|
||||
|
||||
|
||||
def test_get_new_command():
|
||||
with patch('thefuck.rules.no_command._get_all_bins',
|
||||
with patch('thefuck.rules.no_command._get_all_callables',
|
||||
return_value=['vim', 'apt-get']):
|
||||
assert get_new_command(
|
||||
Mock(stderr='vom: not found',
|
||||
|
Reference in New Issue
Block a user