mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-09 20:15:01 +08:00
Fix invalidating cache with jedi#show_call_signatures (#968)
This commit is contained in:
committed by
Dave Halter
parent
ac6b2f1e3e
commit
c80a08d983
@@ -44,6 +44,26 @@ describe 'signatures'
|
||||
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable*_*) ?!?jedi?!?'
|
||||
end
|
||||
|
||||
it 'highlights correct argument'
|
||||
if !has('python3')
|
||||
SKIP 'py2: no signatures with print()'
|
||||
endif
|
||||
noautocmd normal o
|
||||
doautocmd CursorHoldI
|
||||
noautocmd normal iprint(42, sep="X", )
|
||||
" Move to "=" - hightlights "sep=...".
|
||||
noautocmd normal 5h
|
||||
doautocmd CursorHoldI
|
||||
Expect getline(1) =~# '\V\^?!?jedi=0, ?!? (*values: object, *_*sep: Text=...*_*'
|
||||
" Move left to "=" - hightlights first argument ("values").
|
||||
" NOTE: it is arguable that maybe "sep=..." should be highlighted
|
||||
" still, but this tests for the cache to be "busted", and that
|
||||
" fresh results are retrieved from Jedi.
|
||||
noautocmd normal h
|
||||
doautocmd CursorHoldI
|
||||
Expect getline(1) =~# '\V\^?!?jedi=0, ?!? (*_**values: object*_*, sep: Text=...,'
|
||||
end
|
||||
|
||||
it 'no signature'
|
||||
exe 'normal ostr '
|
||||
Python jedi_vim.show_call_signatures()
|
||||
|
||||
Reference in New Issue
Block a user