X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_pydocstyle.vader diff --git a/.vim/bundle/ale/test/linter/test_pydocstyle.vader b/.vim/bundle/ale/test/linter/test_pydocstyle.vader new file mode 100644 index 00000000..cdc36885 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_pydocstyle.vader @@ -0,0 +1,51 @@ +Before: + call ale#assert#SetUpLinterTest('python', 'pydocstyle') + call ale#test#SetFilename('example/test.py') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The pydocstyle command callback should return default string): + AssertLinterCwd '%s:h' + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' %s' + +Execute(The pydocstyle command callback should allow options): + let g:ale_python_pydocstyle_options = '--verbose' + + AssertLinter 'pydocstyle', ale#Escape('pydocstyle') . ' --verbose %s' + +Execute(The pydocstyle executable should be configurable): + let g:ale_python_pydocstyle_executable = '~/.local/bin/pydocstyle' + + AssertLinter '~/.local/bin/pydocstyle', + \ ale#Escape('~/.local/bin/pydocstyle') . ' %s' + +Execute(Setting executable to 'pipenv' appends 'run pydocstyle'): + let g:ale_python_pydocstyle_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pydocstyle %s' + +Execute(Pipenv is detected when python_pydocstyle_auto_pipenv is set): + let g:ale_python_pydocstyle_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', ale#Escape('pipenv') . ' run pydocstyle %s' + +Execute(Setting executable to 'poetry' appends 'run pydocstyle'): + let g:ale_python_pydocstyle_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pydocstyle %s' + +Execute(Poetry is detected when python_pydocstyle_auto_poetry is set): + let g:ale_python_pydocstyle_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', ale#Escape('poetry') . ' run pydocstyle %s' + +Execute(uv is detected when python_pydocstyle_auto_uv is set): + let g:ale_python_pydocstyle_auto_uv = 1 + call ale#test#SetFilename('../test-files/python/uv/whatever.py') + + AssertLinter 'uv', ale#Escape('uv') . ' run pydocstyle %s'