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', 'pyre')
3 let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
8 call ale#assert#TearDownLinterTest()
10 Execute(The pyre command callback should return default string):
11 call ale#test#SetFilename('./foo.py')
13 AssertLinter 'pyre', ale#Escape('pyre') . ' persistent'
15 Execute(The pyre executable should be configurable):
16 let g:ale_python_pyre_executable = '~/.local/bin/pyre'
18 AssertLinter '~/.local/bin/pyre',
19 \ ale#Escape('~/.local/bin/pyre') . ' persistent'
21 Execute(The pyre executable should be run from the virtualenv path):
22 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
24 let b:executable = ale#path#Simplify(
25 \ g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/pyre'
28 AssertLinter b:executable, ale#Escape(b:executable) . ' persistent'
30 Execute(You should be able to override the pyre virtualenv lookup):
31 call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
33 let g:ale_python_pyre_use_global = 1
35 AssertLinter 'pyre', ale#Escape('pyre') . ' persistent'
37 Execute(Setting executable to 'pipenv' appends 'run pyre'):
38 let g:ale_python_pyre_executable = 'path/to/pipenv'
39 call ale#test#SetFilename('../test-files/dummy')
41 AssertLinter 'path/to/pipenv',
42 \ ale#Escape('path/to/pipenv') . ' run pyre persistent'
44 Execute(Pipenv is detected when python_pyre_auto_pipenv is set):
45 let g:ale_python_pyre_auto_pipenv = 1
46 call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
48 AssertLinter 'pipenv',
49 \ ale#Escape('pipenv') . ' run pyre persistent'
51 Execute(Setting executable to 'poetry' appends 'run pyre'):
52 let g:ale_python_pyre_executable = 'path/to/poetry'
54 AssertLinter 'path/to/poetry',
55 \ ale#Escape('path/to/poetry') . ' run pyre persistent'
57 Execute(Poetry is detected when python_pyre_auto_poetry is set):
58 let g:ale_python_pyre_auto_poetry = 1
59 call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
61 AssertLinter 'poetry',
62 \ ale#Escape('poetry') . ' run pyre persistent'
64 Execute(uv is detected when python_pyre_auto_uv is set):
65 let g:ale_python_pyre_auto_uv = 1
66 call ale#test#SetFilename('../test-files/python/uv/whatever.py')
69 \ ale#Escape('uv') . ' run pyre persistent'
71 Execute(The FindProjectRoot should detect the project root directory for namespace package via .pyre_configuration.local):
72 silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/pyre_configuration_dir/foo/bar.py')
75 \ ale#path#Simplify(g:dir . '/../test-files/python/pyre_configuration_dir'),
76 \ ale#python#FindProjectRoot(bufnr(''))