diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-08-29 10:42:25 +0200 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-08-29 10:42:25 +0200 |
commit | 0de847a8e1793b597ba0a73ae8e20797a5fce920 (patch) | |
tree | 6f465b404af38ff25dddde94e052bdfa0a3a38c8 /test/command_callback/test_pylint_command_callback.vader | |
parent | 62f07d820c2b474216657bd43a3a919469c9584f (diff) | |
parent | 7d4ce4e6aa960a6052a16d90322566d6f4fddb7c (diff) | |
download | ale-0de847a8e1793b597ba0a73ae8e20797a5fce920.zip |
Merge remote-tracking branch 'upstream/master'
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' |