mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-24 03:51:58 +08:00
Massively reduce the amount of code needed for linter tests
This commit is contained in:
@@ -1,23 +1,12 @@
|
||||
Before:
|
||||
Save g:ale_python_mypy_executable
|
||||
Save g:ale_python_mypy_options
|
||||
|
||||
unlet! g:ale_python_mypy_executable
|
||||
unlet! g:ale_python_mypy_options
|
||||
|
||||
runtime ale_linters/python/prospector.vim
|
||||
call ale#assert#SetUpLinterTest('python', 'prospector')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
unlet! b:executable
|
||||
|
||||
call ale#linter#Reset()
|
||||
call ale#assert#TearDownLinterTest()
|
||||
|
||||
Execute(Setting executable to 'pipenv' appends 'run prospector'):
|
||||
let g:ale_python_prospector_executable = 'path/to/pipenv'
|
||||
|
||||
AssertEqual
|
||||
AssertLinter 'path/to/pipenv',
|
||||
\ ale#Escape('path/to/pipenv') . ' run prospector'
|
||||
\ . ' --messages-only --absolute-paths --zero-exit --output-format json %s',
|
||||
\ ale_linters#python#prospector#GetCommand(bufnr(''))
|
||||
\ . ' --messages-only --absolute-paths --zero-exit --output-format json %s'
|
||||
|
||||
Reference in New Issue
Block a user