summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBuck Evan <bukzor@google.com>2021-07-04 05:15:37 -0700
committerGitHub <noreply@github.com>2021-07-04 21:15:37 +0900
commit52563f91816f86fbc3e6d9f01ca50a8d85fdbee5 (patch)
tree15e2f6d878ff4e7f9d87faf9d4a29759e9268980 /test
parent45430eb07e0dbfbd957f2ce728603afb6e5b4100 (diff)
downloadale-52563f91816f86fbc3e6d9f01ca50a8d85fdbee5.zip
black fixer: --pyi option was appended without a space (#3759)
Diffstat (limited to 'test')
-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