forked from VimPlug/jedi-vim
tests: move/rename/cleanup vspec based tests (#860)
The main motivation is to being able to use normal/other pytest based tests. Therefore this moves everything from conftest into test_integration itself.
This commit is contained in:
35
test/vspec/pyimport.vim
Normal file
35
test/vspec/pyimport.vim
Normal file
@@ -0,0 +1,35 @@
|
||||
source plugin/jedi.vim
|
||||
source test/_utils.vim
|
||||
|
||||
describe 'pyimport'
|
||||
before
|
||||
let g:jedi#use_tabs_not_buffers = 1
|
||||
end
|
||||
|
||||
after
|
||||
try | %bwipeout! | catch | endtry
|
||||
end
|
||||
|
||||
it 'open_tab'
|
||||
Pyimport os
|
||||
Expect CurrentBufferIsModule('os') == 1
|
||||
Pyimport subprocess
|
||||
Expect CurrentBufferIsModule('subprocess') == 1
|
||||
" the empty tab is sometimes also a tab
|
||||
Expect tabpagenr('$') >= 2
|
||||
end
|
||||
|
||||
it 'completion'
|
||||
" don't know how to test this directly
|
||||
"execute "Pyimport subproc\<Tab>"
|
||||
"Expect CurrentBufferIsModule('subprocess') == 1
|
||||
|
||||
Expect jedi#py_import_completions('subproc', 0, 0) == 'subprocess'
|
||||
Expect jedi#py_import_completions('subprocess', 0, 0) == 'subprocess'
|
||||
let g:comp = jedi#py_import_completions('zip', 0, 0)
|
||||
" Sometimes zipapp is in there sometimes not, depends on Python
|
||||
" version.
|
||||
let g:comp = substitute(g:comp, '^zipapp\n', '', '')
|
||||
Expect g:comp == "zipfile\nzipimport"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user