mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 03:04:30 +08:00
Use staticmethod for call signature tests instead of str
str has different signatures for Python 2 and 3 and is therefore annoying to test.
This commit is contained in:
@@ -39,9 +39,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 istr()
|
noautocmd normal istaticmethod()
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '?!?jedi=0, ?!? (*_*o: bytes*_*, encoding: str = ..., errors: str = ...) ?!?jedi?!?'
|
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable*_*) ?!?jedi?!?'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'no signature'
|
it 'no signature'
|
||||||
@@ -64,11 +64,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()
|
||||||
|
|
||||||
exe 'normal ostr( '
|
exe 'normal ostaticmethod( '
|
||||||
redir => msg
|
redir => msg
|
||||||
Python jedi_vim.show_call_signatures()
|
Python jedi_vim.show_call_signatures()
|
||||||
redir END
|
redir END
|
||||||
Expect msg == "\nstr((o: bytes, o: object = ...), …)"
|
Expect msg == "\nstaticmethod(f: Callable)"
|
||||||
|
|
||||||
redir => msg
|
redir => msg
|
||||||
doautocmd InsertLeave
|
doautocmd InsertLeave
|
||||||
|
|||||||
Reference in New Issue
Block a user