summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-09-10 15:18:41 +0900
committerGitHub <noreply@github.com>2021-09-10 15:18:41 +0900
commitbf29f6ea92ff993d5d96bc4e760f315e95e332a5 (patch)
treeec1b80c3128da0dbc18fcdcb1174390d447f4b52 /test/fixers
parentb504eeb094b26a635f260a92e0b9762ad2eb1862 (diff)
downloadale-bf29f6ea92ff993d5d96bc4e760f315e95e332a5.zip
Fix 3897 - add poetry to isort (#3898)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_isort_fixer_callback.vader20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader
index 8bfe1238..72882737 100644
--- a/test/fixers/test_isort_fixer_callback.vader
+++ b/test/fixers/test_isort_fixer_callback.vader
@@ -10,10 +10,6 @@ After:
unlet! b:bin_dir
Execute(The isort callback should return the correct default values):
- AssertEqual
- \ 0,
- \ ale#fixers#isort#Fix(bufnr(''))
-
silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
@@ -25,10 +21,6 @@ Execute(The isort callback should return the correct default values):
Execute(The isort callback should respect custom options):
let g:ale_python_isort_options = '--multi-line=3 --trailing-comma'
- AssertEqual
- \ 0,
- \ ale#fixers#isort#Fix(bufnr(''))
-
silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
AssertEqual
\ {
@@ -49,3 +41,15 @@ Execute(Pipenv is detected when python_isort_auto_pipenv is set):
\ 'command': ale#Escape('pipenv') . ' run isort' . ' --filename %s' . ' -'
\ },
\ ale#fixers#isort#Fix(bufnr(''))
+
+Execute(Poetry is detected when python_isort_auto_poetry is set):
+ let g:ale_python_isort_auto_poetry = 1
+
+ call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
+
+ AssertEqual
+ \ {
+ \ 'cwd': '%s:h',
+ \ 'command': ale#Escape('poetry') . ' run isort' . ' --filename %s' . ' -'
+ \ },
+ \ ale#fixers#isort#Fix(bufnr(''))