mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
Add test for isort with auto_pipenv flag(s)
This commit is contained in:
@@ -5,6 +5,7 @@ Before:
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_python_isort_executable = 'xxxinvalid'
|
||||
let g:ale_python_isort_options = ''
|
||||
let g:ale_python_isort_auto_pipenv = 0
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
@@ -48,3 +49,12 @@ Execute(The isort callback should respect custom options):
|
||||
\ . ' --multi-line=3 --trailing-comma -',
|
||||
\ },
|
||||
\ ale#fixers#isort#Fix(bufnr(''))
|
||||
|
||||
Execute(Pipenv is detected when python_isort_auto_pipenv is set):
|
||||
let g:ale_python_isort_auto_pipenv = 1
|
||||
|
||||
call ale#test#SetFilename('/testplugin/test/python_fixtures/pipenv/whatever.py')
|
||||
|
||||
AssertEqual
|
||||
\ {'command': 'cd %s:h && ' . ale#Escape('pipenv') . ' run isort -'},
|
||||
\ ale#fixers#isort#Fix(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user