summaryrefslogtreecommitdiff
path: root/test/linter/test_mypy.vader
diff options
context:
space:
mode:
authorDaniel Roseman <daniel@roseman.org.uk>2021-07-25 05:39:05 +0100
committerGitHub <noreply@github.com>2021-07-25 13:39:05 +0900
commit7d8fb2ba1716a744446b811fc278ecf30d4eb771 (patch)
treecabed5301053216ab424e6f554dc7595b1948bb3 /test/linter/test_mypy.vader
parent530b38de342a21cce330a32af0c1b66671d335c2 (diff)
downloadale-7d8fb2ba1716a744446b811fc278ecf30d4eb771.zip
Python support poetry (#3834)
* Add poetry support to python linters and black fixer. * Update python.vim to detect poetry project. * Update ale.vim, add an option for poetry `g:ale_python_auto_poetry`. * Update ale-python.txt, add poetry support. * Add and update poetry related tests. Co-authored-by: unc0 <unc0@users.noreply.github.com>
Diffstat (limited to 'test/linter/test_mypy.vader')
-rw-r--r--test/linter/test_mypy.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/linter/test_mypy.vader b/test/linter/test_mypy.vader
index 8c1e5e9c..bac59d92 100644
--- a/test/linter/test_mypy.vader
+++ b/test/linter/test_mypy.vader
@@ -88,3 +88,19 @@ Execute(Pipenv is detected when python_mypy_auto_pipenv is set):
AssertLinterCwd expand('#' . bufnr('') . ':p:h')
AssertLinter 'pipenv',
\ ale#Escape('pipenv') . ' run mypy --show-column-numbers --shadow-file %s %t %s'
+
+Execute(Setting executable to 'poetry' appends 'run mypy'):
+ let g:ale_python_mypy_executable = 'path/to/poetry'
+
+ AssertLinterCwd expand('#' . bufnr('') . ':p:h')
+ AssertLinter 'path/to/poetry',
+ \ ale#Escape('path/to/poetry') . ' run mypy'
+ \ . ' --show-column-numbers --shadow-file %s %t %s'
+
+Execute(Poetry is detected when python_mypy_auto_poetry is set):
+ call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
+ let g:ale_python_mypy_auto_poetry = 1
+
+ AssertLinterCwd expand('#' . bufnr('') . ':p:h')
+ AssertLinter 'poetry',
+ \ ale#Escape('poetry') . ' run mypy --show-column-numbers --shadow-file %s %t %s'