Adding new stuff
This commit is contained in:
parent
0b3d063cb3
commit
0074feeaf2
1580 changed files with 0 additions and 205558 deletions
|
|
@ -1,24 +0,0 @@
|
|||
source plugin/pymode.vim
|
||||
|
||||
describe 'docs'
|
||||
before
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode show docs'
|
||||
Expect g:pymode_doc == 1
|
||||
put = 'def'
|
||||
normal GK
|
||||
wincmd p
|
||||
Expect bufname('%') == "__doc__"
|
||||
Expect getline(1) == 'Function definitions'
|
||||
Expect &filetype == 'rst'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
source plugin/pymode.vim
|
||||
|
||||
describe 'pymode-ftplugin'
|
||||
|
||||
before
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode init'
|
||||
PymodePython import pymode
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
source plugin/pymode.vim
|
||||
|
||||
describe 'indent'
|
||||
|
||||
before
|
||||
set ft=python
|
||||
source after/indent/python.vim
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode indent loaded'
|
||||
Expect g:pymode_indent == 1
|
||||
Expect &expandtab == 1
|
||||
Expect &shiftround == 1
|
||||
Expect &autoindent == 1
|
||||
Expect &indentexpr == 'pymode#indent#get_indent(v:lnum)'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
source plugin/pymode.vim
|
||||
|
||||
describe 'pymode check code'
|
||||
|
||||
before
|
||||
set ft=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode lint loaded'
|
||||
Expect g:pymode_lint == 1
|
||||
end
|
||||
|
||||
it 'lint new'
|
||||
put =['# coding: utf-8', 'call_unknown_function()']
|
||||
PymodeLint
|
||||
Expect getloclist(0) == []
|
||||
end
|
||||
|
||||
it 'lint code'
|
||||
e t/test.py
|
||||
PymodeLint
|
||||
Expect getloclist(0) == [{'lnum': 6, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': 0, 'type': 'E', 'pattern': '', 'text': 'W0612 local variable "unused" is assigned to but never used [pyflakes]'}, {'lnum': 8, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': 0, 'type': 'E', 'pattern': '', 'text': 'E0602 undefined name "unknown" [pyflakes]'}]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
describe 'pymode-plugin'
|
||||
|
||||
before
|
||||
source plugin/pymode.vim
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode options'
|
||||
Expect g:pymode == 1
|
||||
Expect g:pymode_python == 'python'
|
||||
Expect g:pymode_paths == []
|
||||
Expect g:pymode_virtualenv == 1
|
||||
Expect g:pymode_run == 1
|
||||
Expect g:pymode_lint == 1
|
||||
Expect g:pymode_breakpoint == 1
|
||||
Expect g:pymode_doc == 1
|
||||
Expect g:pymode_indent == 1
|
||||
end
|
||||
|
||||
it 'pymode interpreter'
|
||||
PymodePython import vim
|
||||
PymodePython vim.current.buffer.append('test success')
|
||||
Expect getline('$') == 'test success'
|
||||
end
|
||||
|
||||
it 'pymode save'
|
||||
Expect expand('%') == ''
|
||||
Expect pymode#save() == 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
describe 'pymode-python-disable'
|
||||
before
|
||||
let g:pymode_python = 'disable'
|
||||
source plugin/pymode.vim
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode disable python'
|
||||
Expect g:pymode_doc == 0
|
||||
Expect g:pymode_lint == 0
|
||||
Expect g:pymode_path == 0
|
||||
Expect g:pymode_rope == 0
|
||||
Expect g:pymode_run == 0
|
||||
Expect g:pymode_virtualenv == 0
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
let g:pymode_rope_completion_bind = 'X'
|
||||
let g:pymode_rope_autoimport = 0
|
||||
let g:pymode_debug = 1
|
||||
let g:pymode_rope_lookup_project = 0
|
||||
|
||||
source plugin/pymode.vim
|
||||
|
||||
describe 'pymode-plugin'
|
||||
|
||||
before
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode rope auto open project in current working directory'
|
||||
|
||||
if $TRAVIS != ""
|
||||
SKIP 'Travis fails on this test'
|
||||
endif
|
||||
|
||||
let project_path = getcwd() . '/.ropeproject'
|
||||
Expect isdirectory(project_path) == 0
|
||||
normal oimporX
|
||||
Expect getline('.') == 'import'
|
||||
Expect g:pymode_rope_current == getcwd() . '/'
|
||||
Expect g:pymode_rope_current . '.ropeproject' == project_path
|
||||
Expect isdirectory(project_path) == 1
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
describe 'pymode-syntax'
|
||||
|
||||
before
|
||||
syntax on
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode-syntax options'
|
||||
Expect g:pymode_syntax == 1
|
||||
Expect g:pymode_syntax_all == 1
|
||||
Expect g:pymode_syntax_print_as_function == 0
|
||||
Expect g:pymode_syntax_highlight_async_await == 1
|
||||
Expect g:pymode_syntax_highlight_equal_operator == 1
|
||||
Expect g:pymode_syntax_highlight_stars_operator == 1
|
||||
Expect g:pymode_syntax_highlight_self == 1
|
||||
Expect g:pymode_syntax_indent_errors == 1
|
||||
Expect g:pymode_syntax_space_errors == 1
|
||||
Expect g:pymode_syntax_string_formatting == 1
|
||||
Expect g:pymode_syntax_string_format == 1
|
||||
Expect g:pymode_syntax_string_templates == 1
|
||||
Expect g:pymode_syntax_doctests == 1
|
||||
Expect g:pymode_syntax_builtin_objs == 1
|
||||
Expect g:pymode_syntax_builtin_types == 1
|
||||
Expect g:pymode_syntax_builtin_funcs == 1
|
||||
Expect g:pymode_syntax_highlight_exceptions == 1
|
||||
Expect g:pymode_syntax_slow_sync == 1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
|
||||
def main():
|
||||
unused = 1
|
||||
|
||||
unknown()
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
source plugin/pymode.vim
|
||||
|
||||
describe 'pymode troubleshooting'
|
||||
|
||||
after
|
||||
bd!
|
||||
bd!
|
||||
end
|
||||
|
||||
it 'pymode troubleshooting'
|
||||
call pymode#troubleshooting#test()
|
||||
Expect getline(1) == 'Pymode diagnostic'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
describe 'pymode-virtualenv'
|
||||
|
||||
before
|
||||
source plugin/pymode.vim
|
||||
set filetype=python
|
||||
end
|
||||
|
||||
after
|
||||
bd!
|
||||
end
|
||||
|
||||
" TODO: How can we mock the virtualenv activation to check that the
|
||||
" proper path is set to pymode_virtualenv_enabled? Right now, the
|
||||
" python function enable_virtualenv gets called but fails when trying
|
||||
" to actually activate so the env.let never gets called
|
||||
|
||||
it 'accepts relative paths'
|
||||
call pymode#virtualenv#activate("sample/relative/path")
|
||||
" Our path variable is the path argument
|
||||
Expect g:pymode_virtualenv_path == "sample/relative/path"
|
||||
end
|
||||
|
||||
it 'accepts absolute paths'
|
||||
call pymode#virtualenv#activate("/sample/absolute/path")
|
||||
" Our path variable is the path argument
|
||||
Expect g:pymode_virtualenv_path == "/sample/absolute/path"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue