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#SetUpLinterTest('python', 'pyflakes')
3 let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
8 call ale#assert#TearDownLinterTest()
10 Execute(The pyflakes command callback should return default string):
11 AssertLinter 'pyflakes', ale#Escape('pyflakes') . ' %t'
13 Execute(The pyflakes executable should be configurable):
14 let g:ale_python_pyflakes_executable = '~/.local/bin/pyflakes'
16 AssertLinter '~/.local/bin/pyflakes',
17 \ ale#Escape('~/.local/bin/pyflakes') . ' %t'
19 Execute(The pyflakes executable should be run from the virtualenv path):
20 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
22 let b:executable = ale#path#Simplify(
23 \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pyflakes'
26 AssertLinter b:executable, ale#Escape(b:executable) . ' %t'
28 Execute(You should be able to override the pyflakes virtualenv lookup):
29 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
31 let g:ale_python_pyflakes_use_global = 1
33 AssertLinter 'pyflakes', ale#Escape('pyflakes') . ' %t'
35 Execute(Setting executable to 'pipenv' appends 'run pyflakes'):
36 let g:ale_python_pyflakes_executable = 'path/to/pipenv'
37 call ale#test#SetFilename('../test-files/dummy')
39 AssertLinter 'path/to/pipenv',
40 \ ale#Escape('path/to/pipenv') . ' run pyflakes %t',
42 Execute(Pipenv is detected when python_pyflakes_auto_pipenv is set):
43 let g:ale_python_pyflakes_auto_pipenv = 1
44 call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
46 AssertLinter 'pipenv',
47 \ ale#Escape('pipenv') . ' run pyflakes %t'
49 Execute(Setting executable to 'poetry' appends 'run pyflakes'):
50 let g:ale_python_pyflakes_executable = 'path/to/poetry'
52 AssertLinter 'path/to/poetry',
53 \ ale#Escape('path/to/poetry') . ' run pyflakes %t',
55 Execute(Poetry is detected when python_pyflakes_auto_poetry is set):
56 let g:ale_python_pyflakes_auto_poetry = 1
57 call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
59 AssertLinter 'poetry',
60 \ ale#Escape('poetry') . ' run pyflakes %t'
62 Execute(uv is detected when python_pyflakes_auto_uv is set):
63 let g:ale_python_pyflakes_auto_uv = 1
64 call ale#test#SetFilename('../test-files/python/uv/whatever.py')
67 \ ale#Escape('uv') . ' run pyflakes %t'