mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 06:38:32 +00:00
Test pyenv change
This commit is contained in:
parent
cc2a6d5d67
commit
773b650cac
@ -9,6 +9,21 @@ def output(pyenv_cmd):
|
||||
return "pyenv: no such command `{}'".format(pyenv_cmd)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def Popen(mocker):
|
||||
mock = mocker.patch('thefuck.rules.pyenv_no_such_command.Popen')
|
||||
mock.return_value.stdout.readlines.return_value = (
|
||||
b'--version\nactivate\ncommands\ncompletions\ndeactivate\nexec_\n'
|
||||
b'global\nhelp\nhooks\ninit\ninstall\nlocal\nprefix_\n'
|
||||
b'realpath.dylib\nrehash\nroot\nshell\nshims\nuninstall\nversion_\n'
|
||||
b'version-file\nversion-file-read\nversion-file-write\nversion-name_\n'
|
||||
b'version-origin\nversions\nvirtualenv\nvirtualenv-delete_\n'
|
||||
b'virtualenv-init\nvirtualenv-prefix\nvirtualenvs_\n'
|
||||
b'virtualenvwrapper\nvirtualenvwrapper_lazy\nwhence\nwhich_\n'
|
||||
).split()
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.mark.parametrize('script, pyenv_cmd', [
|
||||
('pyenv globe', 'globe'),
|
||||
('pyenv intall 3.8.0', 'intall'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user