From 7e6811cb4b214fce25d39eec2c4362378c50e479 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 12 Oct 2017 09:37:15 +0200 Subject: [PATCH] Fix call signature tests Now all tests should be fixed again. Also removed a deprecated call to call_name. --- pythonx/jedi_vim.py | 2 +- test/signatures.vim | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 7c249e5..df5148b 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -505,7 +505,7 @@ def cmdline_call_signatures(signatures): vim_command(' echon "%s" | ' 'echohl Function | echon "%s" | ' 'echohl None | echon "(%s)"' - % (spaces, signatures[0].call_name, text)) + % (spaces, signatures[0].name, text)) @_check_jedi_availability(show_error=True) diff --git a/test/signatures.vim b/test/signatures.vim index c1525f6..08c97a6 100644 --- a/test/signatures.vim +++ b/test/signatures.vim @@ -11,14 +11,17 @@ describe 'signatures' end it 'simple' - normal oabs( + normal odef xyz(number): return + normal o + normal oxyz( + normal G$ " equals doautocmd CursorMovedI Python jedi_vim.show_call_signatures() - Expect getline(1) == '=`=jedi=0, =`= (*_*number*_*) =`=jedi=`=' + Expect getline(3) == '?!?jedi=0, ?!? (*_*number*_*) ?!?jedi?!?' doautocmd InsertLeave - Expect getline(1) == '' + Expect getline(3) == '' end it 'multiple buffers' @@ -40,9 +43,9 @@ describe 'signatures' it 'simple after CursorHoldI with only parenthesis' noautocmd normal o doautocmd CursorHoldI - noautocmd normal iabs( + noautocmd normal istr( doautocmd CursorHoldI - Expect getline(1) == '=`=jedi=0, =`= (*_*number*_*) =`=jedi=`=' + Expect getline(1) == '?!?jedi=0, ?!? (*_*object*_*) ?!?jedi?!?' end it 'no signature' @@ -65,11 +68,11 @@ describe 'signatures' let g:jedi#show_call_signatures = 2 call jedi#configure_call_signatures() - normal oabs( + normal ostr( redir => msg Python jedi_vim.show_call_signatures() redir END - Expect msg == "\nabs(number)" + Expect msg == "\nstr(object)" redir => msg doautocmd InsertLeave