X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_pycodestyle.vader diff --git a/.vim/bundle/ale/test/linter/test_pycodestyle.vader b/.vim/bundle/ale/test/linter/test_pycodestyle.vader new file mode 100644 index 00000000..85983122 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_pycodestyle.vader @@ -0,0 +1,53 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pycodestyle') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The pycodestyle command callback should return default string): + AssertLinter 'pycodestyle', ale#Escape('pycodestyle') . ' -' + +Execute(The pycodestyle command callback should allow options): + let g:ale_python_pycodestyle_options = '--exclude=test*.py' + + AssertLinter 'pycodestyle', + \ ale#Escape('pycodestyle') . ' --exclude=test*.py -' + +Execute(The pycodestyle executable should be configurable): + let g:ale_python_pycodestyle_executable = '~/.local/bin/pycodestyle' + + AssertLinter '~/.local/bin/pycodestyle', + \ ale#Escape('~/.local/bin/pycodestyle') . ' -' + +Execute(Setting executable to 'pipenv' appends 'run pycodestyle'): + let g:ale_python_pycodestyle_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pycodestyle -' + +Execute(Pipenv is detected when python_pycodestyle_auto_pipenv is set): + let g:ale_python_pycodestyle_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pycodestyle -' + +Execute(Setting executable to 'poetry' appends 'run pycodestyle'): + let g:ale_python_pycodestyle_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pycodestyle -' + +Execute(Poetry is detected when python_pycodestyle_auto_poetry is set): + let g:ale_python_pycodestyle_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pycodestyle -' + +Execute(uv is detected when python_pycodestyle_auto_uv is set): + let g:ale_python_pycodestyle_auto_uv = 1 + call ale#test#SetFilename('../test-files/python/uv/whatever.py') + + AssertLinter 'uv', + \ ale#Escape('uv') . ' run pycodestyle -'