diff options
author | richyfish <richard.french.uk@googlemail.com> | 2019-08-18 15:45:15 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2019-08-18 15:45:15 +0100 |
commit | c4bdf165caf99706f439ecbe1a1d1865d53545a8 (patch) | |
tree | 546bd72eb8d8b4799294583773aa60f5c44bdb81 /test/fixers/test_black_fixer_callback.vader | |
parent | ddb559b3bed31b81e8189c3caa8074842574f662 (diff) | |
download | ale-c4bdf165caf99706f439ecbe1a1d1865d53545a8.zip |
Black fixer should include --pyi for files with .pyi extension (#2705)
* black fixer should include --pyi for files with .pyi extension
Diffstat (limited to 'test/fixers/test_black_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_black_fixer_callback.vader | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fixers/test_black_fixer_callback.vader b/test/fixers/test_black_fixer_callback.vader index 25ad05db..75864479 100644 --- a/test/fixers/test_black_fixer_callback.vader +++ b/test/fixers/test_black_fixer_callback.vader @@ -36,6 +36,14 @@ Execute(The black callback should include options): \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --some-option -' }, \ ale#fixers#black#Fix(bufnr('')) +Execute(The black callback should include --pyi for .pyi files): + let g:ale_python_black_change_directory = 0 + + silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.pyi') + AssertEqual + \ {'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/black')) . ' --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 |