All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 call ale#assert#SetUpFixerTest('python', 'isort')
4 let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
7 call ale#assert#TearDownFixerTest()
12 Execute(The isort callback should return the correct default values):
13 silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
15 " --filename option exists only after 5.7.0
16 GivenCommandOutput ['VERSION 5.7.0']
20 \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' --filename %s' . ' -',
23 Execute(The isort callback should respect custom options):
24 let g:ale_python_isort_options = '--multi-line=3 --trailing-comma'
26 silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
28 " --filename option exists only after 5.7.0
29 GivenCommandOutput ['VERSION 5.7.0']
33 \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort'))
34 \ . ' --filename %s' . ' --multi-line=3 --trailing-comma -',
37 Execute(Pipenv is detected when python_isort_auto_pipenv is set):
38 let g:ale_python_isort_auto_pipenv = 1
40 call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
42 GivenCommandOutput ['VERSION 5.7.0']
46 \ 'command': ale#Escape('pipenv') . ' run isort' . ' --filename %s' . ' -'
49 Execute(Poetry is detected when python_isort_auto_poetry is set):
50 let g:ale_python_isort_auto_poetry = 1
52 call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
54 GivenCommandOutput ['VERSION 5.7.0']
58 \ 'command': ale#Escape('poetry') . ' run isort' . ' --filename %s' . ' -'
61 Execute(uv is detected when python_isort_auto_uv is set):
62 let g:ale_python_isort_auto_uv = 1
64 call ale#test#SetFilename('../test-files/python/uv/whatever.py')
66 GivenCommandOutput ['VERSION 5.7.0']
70 \ 'command': ale#Escape('uv') . ' run isort' . ' --filename %s' . ' -'
74 Execute(The isort callback should not use --filename for older versions):
75 silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/with_virtualenv/subdir/foo/bar.py')
77 " --filename option exists only after 5.7.0
78 GivenCommandOutput ['VERSION 5.6.0']
82 \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/isort')) . ' -',