mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 09:39:01 +00:00
Merge 809b5aa0c78e668d8038e155205fcbfbb4821f9e into fc3fcf028ac480bab2ab6a9f58f4accce5faf084
This commit is contained in:
commit
404ed70a7d
@ -1,9 +1,9 @@
|
|||||||
from mock import patch, Mock
|
from mock import patch, Mock
|
||||||
from thefuck.rules.no_command import match, get_new_command
|
from thefuck.rules.z_no_command import match, get_new_command
|
||||||
|
|
||||||
|
|
||||||
def test_match():
|
def test_match():
|
||||||
with patch('thefuck.rules.no_command._get_all_bins',
|
with patch('thefuck.rules.z_no_command._get_all_bins',
|
||||||
return_value=['vim', 'apt-get']):
|
return_value=['vim', 'apt-get']):
|
||||||
assert match(Mock(stderr='vom: not found', script='vom file.py'), None)
|
assert match(Mock(stderr='vom: not found', script='vom file.py'), None)
|
||||||
assert not match(Mock(stderr='qweqwe: not found', script='qweqwe'), None)
|
assert not match(Mock(stderr='qweqwe: not found', script='qweqwe'), None)
|
||||||
@ -11,7 +11,7 @@ def test_match():
|
|||||||
|
|
||||||
|
|
||||||
def test_get_new_command():
|
def test_get_new_command():
|
||||||
with patch('thefuck.rules.no_command._get_all_bins',
|
with patch('thefuck.rules.z_no_command._get_all_bins',
|
||||||
return_value=['vim', 'apt-get']):
|
return_value=['vim', 'apt-get']):
|
||||||
assert get_new_command(
|
assert get_new_command(
|
||||||
Mock(stderr='vom: not found',
|
Mock(stderr='vom: not found',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user