summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIvor Peles <ivorpeles@gmail.com>2020-10-06 04:06:44 -0400
committerIvor Peles <ivorpeles@gmail.com>2020-11-21 19:24:20 -0500
commit6efca486e8c228e9358d05e0a87d17e973da249e (patch)
treeeb269ca4ffa20cc3026a87468bdc3afda39ab51d /test
parentae86d10e48ae27e08665502772886016c3a3aa3b (diff)
downloadale-6efca486e8c228e9358d05e0a87d17e973da249e.zip
Add test for isort with auto_pipenv flag(s)
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..76c8a4cb 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': 'cd %s:h && ' . ale#Escape('pipenv') . ' run isort -'},
+ \ ale#fixers#isort#Fix(bufnr(''))