forked from VimPlug/jedi-vim
Remove Python 2 stuff
This commit is contained in:
@@ -16,14 +16,8 @@ describe 'documentation docstrings'
|
||||
Expect bufname('%') == "__doc__"
|
||||
Expect &filetype == 'rst'
|
||||
let header = getline(1, 2)
|
||||
PythonJedi vim.vars["is_py2"] = sys.version_info[0] == 2
|
||||
if g:is_py2
|
||||
Expect header[0] == "Docstring for class __builtin__.ImportError"
|
||||
Expect header[1] == "==========================================="
|
||||
else
|
||||
Expect header[0] == "Docstring for class builtins.ImportError"
|
||||
Expect header[1] == "========================================"
|
||||
endif
|
||||
Expect header[0] == "Docstring for class builtins.ImportError"
|
||||
Expect header[1] == "========================================"
|
||||
let content = join(getline(3, '$'), "\n")
|
||||
Expect stridx(content, "Import can't find module") > 0
|
||||
normal K
|
||||
|
||||
@@ -91,7 +91,7 @@ describe 'goto with buffers'
|
||||
put = ['import os']
|
||||
normal G$
|
||||
call jedi#goto_assignments()
|
||||
PythonJedi jedi_vim.goto()
|
||||
python3 jedi_vim.goto()
|
||||
Expect CurrentBufferIsModule('os') == 0
|
||||
" Without hidden, it's not possible to open a new buffer, when the old
|
||||
" one is not saved.
|
||||
|
||||
@@ -45,9 +45,6 @@ describe 'signatures'
|
||||
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", )
|
||||
@@ -66,7 +63,7 @@ describe 'signatures'
|
||||
|
||||
it 'no signature'
|
||||
exe 'normal ostr '
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
Expect getline(1, '$') == ['', 'str ']
|
||||
end
|
||||
|
||||
@@ -74,7 +71,7 @@ describe 'signatures'
|
||||
let g:jedi#show_call_signatures = 0
|
||||
|
||||
exe 'normal ostr( '
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
Expect getline(1, '$') == ['', 'str( ']
|
||||
|
||||
let g:jedi#show_call_signatures = 1
|
||||
@@ -86,7 +83,7 @@ describe 'signatures'
|
||||
|
||||
exe 'normal ostaticmethod( '
|
||||
redir => msg
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
redir END
|
||||
Expect msg == "\nstaticmethod(f: Callable[..., Any])"
|
||||
|
||||
@@ -98,7 +95,7 @@ describe 'signatures'
|
||||
normal Sdef foo(a, b): pass
|
||||
exe 'normal ofoo(a, b, c, '
|
||||
redir => msg
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
redir END
|
||||
Expect msg == "\nfoo(a, b)"
|
||||
end
|
||||
@@ -109,7 +106,7 @@ describe 'signatures'
|
||||
|
||||
function! Signature()
|
||||
redir => msg
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
redir END
|
||||
return msg
|
||||
endfunction
|
||||
@@ -142,7 +139,7 @@ describe 'signatures'
|
||||
|
||||
exe 'normal ostr '
|
||||
redir => msg
|
||||
Python jedi_vim.show_call_signatures()
|
||||
python3 jedi_vim.show_call_signatures()
|
||||
redir END
|
||||
Expect msg == "\n"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user