summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-01-08 10:43:34 +0900
committerGitHub <noreply@github.com>2021-01-08 10:43:34 +0900
commit54dd731cf14c809ebcc9c21b41084a17c5411744 (patch)
tree39ec4ab0d7ad9b3f9062add164a1914d07c6af49 /test
parent4c454c96a9d142475b155a94cc24fad34eca26b2 (diff)
parentce3d891bed18f610beb9117518ef560871ef00a0 (diff)
downloadale-54dd731cf14c809ebcc9c21b41084a17c5411744.zip
Merge pull request #3386 from ivorpeles/master
Make isort fixer recognize auto_pipenv flag
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_isort_fixer_callback.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader
index 7f389dcf..3941f6dd 100644
--- a/test/fixers/test_isort_fixer_callback.vader
+++ b/test/fixers/test_isort_fixer_callback.vader
@@ -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': ale#path#BufferCdString(bufnr('')) . ale#Escape('pipenv') . ' run isort -'},
+ \ ale#fixers#isort#Fix(bufnr(''))