diff options
author | toastal <toastal@protonmail.com> | 2020-09-08 10:08:00 +0700 |
---|---|---|
committer | toastal <toastal@protonmail.com> | 2020-09-08 10:08:00 +0700 |
commit | f07ecbc579a216a0fff18bdc010fe1a4de91fa39 (patch) | |
tree | 13c59e33534ae7b7a79fdf0edaa180222f0ec86b /test/command_callback/test_pylint_command_callback.vader | |
parent | 167e2e77506c55831921ee40dc30c92f7f2aaae8 (diff) | |
parent | b4b75126f9eae30da8f5e0cb9ec100feb38c1cb6 (diff) | |
download | ale-f07ecbc579a216a0fff18bdc010fe1a4de91fa39.zip |
merge master -- apparently someone else added dhall?
Diffstat (limited to 'test/command_callback/test_pylint_command_callback.vader')
-rw-r--r-- | test/command_callback/test_pylint_command_callback.vader | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/command_callback/test_pylint_command_callback.vader b/test/command_callback/test_pylint_command_callback.vader index c41c8398..755dd292 100644 --- a/test/command_callback/test_pylint_command_callback.vader +++ b/test/command_callback/test_pylint_command_callback.vader @@ -1,4 +1,8 @@ Before: + Save g:ale_python_auto_pipenv + + let g:ale_python_auto_pipenv = 0 + call ale#assert#SetUpLinterTest('python', 'pylint') let b:bin_dir = has('win32') ? 'Scripts' : 'bin' @@ -13,7 +17,7 @@ After: Execute(The pylint callbacks should return the correct default values): AssertLinter 'pylint', - \ ale#path#BufferCdString(bufnr('')) + \ ale#path#CdString(expand('#' . bufnr('') . ':p:h')) \ . ale#Escape('pylint') . ' ' . b:command_tail Execute(The option for disabling changing directories should work): @@ -25,14 +29,14 @@ Execute(The pylint executable should be configurable, and escaped properly): let g:ale_python_pylint_executable = 'executable with spaces' AssertLinter 'executable with spaces', - \ ale#path#BufferCdString(bufnr('')) + \ ale#path#CdString(expand('#' . bufnr('') . ':p:h')) \ . ale#Escape('executable with spaces') . ' ' . b:command_tail Execute(The pylint command callback should let you set options): let g:ale_python_pylint_options = '--some-option' AssertLinter 'pylint', - \ ale#path#BufferCdString(bufnr('')) + \ ale#path#CdString(expand('#' . bufnr('') . ':p:h')) \ . ale#Escape('pylint') . ' --some-option' . b:command_tail Execute(The pylint callbacks shouldn't detect virtualenv directories where they don't exist): @@ -65,15 +69,15 @@ Execute(Setting executable to 'pipenv' appends 'run pylint'): let g:ale_python_pylint_executable = 'path/to/pipenv' AssertLinter 'path/to/pipenv', - \ ale#path#BufferCdString(bufnr('')) + \ ale#path#CdString(expand('#' . bufnr('') . ':p:h')) \ . ale#Escape('path/to/pipenv') . ' run pylint' \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' Execute(Pipenv is detected when python_pylint_auto_pipenv is set): let g:ale_python_pylint_auto_pipenv = 1 - call ale#test#SetFilename('/testplugin/test/python_fixtures/pipenv/whatever.py') + call ale#test#SetFilename('../python_fixtures/pipenv/whatever.py') AssertLinter 'pipenv', - \ ale#path#BufferCdString(bufnr('')) + \ ale#path#CdString(expand('#' . bufnr('') . ':p:h')) \ . ale#Escape('pipenv') . ' run pylint' \ . ' --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n %s' |