mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-08 11:34:51 +08:00
Add a choose-venv test
This commit is contained in:
29
test/vspec/choose-venv.vim
Normal file
29
test/vspec/choose-venv.vim
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
source plugin/jedi.vim
|
||||||
|
source test/_utils.vim
|
||||||
|
|
||||||
|
describe 'simple:'
|
||||||
|
before
|
||||||
|
new
|
||||||
|
normal! ifoo
|
||||||
|
end
|
||||||
|
|
||||||
|
after
|
||||||
|
bd!
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'choose'
|
||||||
|
Expect g:jedi#environment_path == 'auto'
|
||||||
|
Expect bufname() == ''
|
||||||
|
|
||||||
|
JediChooseEnvironment
|
||||||
|
" A Python executable needs to be a few letters
|
||||||
|
Expect len(getline('.')) > 5
|
||||||
|
Expect bufname() == 'Hit Enter to Choose an Environment'
|
||||||
|
|
||||||
|
execute "normal \<CR>"
|
||||||
|
Expect g:jedi#environment_path != 'auto'
|
||||||
|
bd " TODO why is this necessary? There seems to be a random buffer.
|
||||||
|
Expect bufname() == ''
|
||||||
|
Expect getline('.') == 'foo'
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user