diff options
author | Derek P Sifford <dereksifford@gmail.com> | 2018-07-04 21:16:57 -0400 |
---|---|---|
committer | Derek P Sifford <dereksifford@gmail.com> | 2018-07-04 21:16:57 -0400 |
commit | 6dc69b2144f567072b9ff757a68de166717b9acf (patch) | |
tree | 4368102832dce74bd8c5a0add6258437e3d9d2e0 /test | |
parent | 3251d95a911af77feb34153b76d0d5415130e724 (diff) | |
download | ale-6dc69b2144f567072b9ff757a68de166717b9acf.zip |
address code review issues
Diffstat (limited to 'test')
-rw-r--r-- | test/fixers/test_isort_fixer_callback.vader | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader index 7c2b515f..56c08d26 100644 --- a/test/fixers/test_isort_fixer_callback.vader +++ b/test/fixers/test_isort_fixer_callback.vader @@ -1,5 +1,6 @@ Before: Save g:ale_python_isort_executable + Save g:ale_python_isort_options " Use an invalid global executable, so we don't match it. let g:ale_python_isort_executable = 'xxxinvalid' @@ -30,3 +31,19 @@ Execute(The isort callback should return the correct default values): \ . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -', \ }, \ ale#fixers#isort#Fix(bufnr('')) + +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 . '/python_paths/with_virtualenv/subdir/foo/bar.py') + AssertEqual + \ { + \ 'command': 'cd ' . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/subdir/foo')) . ' && ' + \ . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/isort')) + \ . ' --multi-line=3 --trailing-comma -', + \ }, + \ ale#fixers#isort#Fix(bufnr('')) |