mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-12 14:54:02 +01:00
Encapsulate force_command in _get_raw_command
Using the `force_command` argument will run into issues as the `_get_raw_command` method simply returns the value of `force_command` (which is a string) while it should actually return a list. Fix #1240
This commit is contained in:
committed by
Pablo Aguiar
parent
c719712b62
commit
0f4a523dc4
@@ -5,8 +5,8 @@ from thefuck.entrypoints.fix_command import _get_raw_command
|
||||
|
||||
class TestGetRawCommand(object):
|
||||
def test_from_force_command_argument(self):
|
||||
known_args = Mock(force_command=['git', 'brunch'])
|
||||
assert _get_raw_command(known_args) == ['git', 'brunch']
|
||||
known_args = Mock(force_command='git brunch')
|
||||
assert _get_raw_command(known_args) == ['git brunch']
|
||||
|
||||
def test_from_command_argument(self, os_environ):
|
||||
os_environ['TF_HISTORY'] = None
|
||||
|
Reference in New Issue
Block a user