mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
Fix call signature tests
Now all tests should be fixed again. Also removed a deprecated call to call_name.
This commit is contained in:
@@ -505,7 +505,7 @@ def cmdline_call_signatures(signatures):
|
|||||||
vim_command(' echon "%s" | '
|
vim_command(' echon "%s" | '
|
||||||
'echohl Function | echon "%s" | '
|
'echohl Function | echon "%s" | '
|
||||||
'echohl None | echon "(%s)"'
|
'echohl None | echon "(%s)"'
|
||||||
% (spaces, signatures[0].call_name, text))
|
% (spaces, signatures[0].name, text))
|
||||||
|
|
||||||
|
|
||||||
@_check_jedi_availability(show_error=True)
|
@_check_jedi_availability(show_error=True)
|
||||||
|
|||||||
@@ -11,14 +11,17 @@ describe 'signatures'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'simple'
|
it 'simple'
|
||||||
normal oabs(
|
normal odef xyz(number): return
|
||||||
|
normal o
|
||||||
|
normal oxyz(
|
||||||
|
normal G$
|
||||||
" equals doautocmd CursorMovedI
|
" equals doautocmd CursorMovedI
|
||||||
Python jedi_vim.show_call_signatures()
|
Python jedi_vim.show_call_signatures()
|
||||||
|
|
||||||
Expect getline(1) == '=`=jedi=0, =`= (*_*number*_*) =`=jedi=`='
|
Expect getline(3) == '?!?jedi=0, ?!? (*_*number*_*) ?!?jedi?!?'
|
||||||
|
|
||||||
doautocmd InsertLeave
|
doautocmd InsertLeave
|
||||||
Expect getline(1) == ''
|
Expect getline(3) == ''
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'multiple buffers'
|
it 'multiple buffers'
|
||||||
@@ -40,9 +43,9 @@ describe 'signatures'
|
|||||||
it 'simple after CursorHoldI with only parenthesis'
|
it 'simple after CursorHoldI with only parenthesis'
|
||||||
noautocmd normal o
|
noautocmd normal o
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
noautocmd normal iabs(
|
noautocmd normal istr(
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '=`=jedi=0, =`= (*_*number*_*) =`=jedi=`='
|
Expect getline(1) == '?!?jedi=0, ?!? (*_*object*_*) ?!?jedi?!?'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'no signature'
|
it 'no signature'
|
||||||
@@ -65,11 +68,11 @@ describe 'signatures'
|
|||||||
let g:jedi#show_call_signatures = 2
|
let g:jedi#show_call_signatures = 2
|
||||||
call jedi#configure_call_signatures()
|
call jedi#configure_call_signatures()
|
||||||
|
|
||||||
normal oabs(
|
normal ostr(
|
||||||
redir => msg
|
redir => msg
|
||||||
Python jedi_vim.show_call_signatures()
|
Python jedi_vim.show_call_signatures()
|
||||||
redir END
|
redir END
|
||||||
Expect msg == "\nabs(number)"
|
Expect msg == "\nstr(object)"
|
||||||
|
|
||||||
redir => msg
|
redir => msg
|
||||||
doautocmd InsertLeave
|
doautocmd InsertLeave
|
||||||
|
|||||||
Reference in New Issue
Block a user