summaryrefslogtreecommitdiff
path: root/test/fixers/test_black_fixer_callback.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers/test_black_fixer_callback.vader')
-rw-r--r--test/fixers/test_black_fixer_callback.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/fixers/test_black_fixer_callback.vader b/test/fixers/test_black_fixer_callback.vader
index 665ba78b..a69eafd9 100644
--- a/test/fixers/test_black_fixer_callback.vader
+++ b/test/fixers/test_black_fixer_callback.vader
@@ -36,6 +36,16 @@ Execute(The black callback should include --pyi for .pyi files):
\ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --pyi -' },
\ ale#fixers#black#Fix(bufnr(''))
+Execute(The black callback should not concatenate options):
+ let g:ale_python_black_options = '--some-option'
+ let g:ale_python_black_change_directory = 0
+
+ silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.pyi')
+
+ AssertEqual
+ \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option --pyi -' },
+ \ ale#fixers#black#Fix(bufnr(''))
+
Execute(Pipenv is detected when python_black_auto_pipenv is set):
let g:ale_python_black_auto_pipenv = 1
let g:ale_python_black_change_directory = 0