]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_pycodestyle.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / linter / test_pycodestyle.vader
1 Before:
2   call ale#assert#SetUpLinterTest('python', 'pycodestyle')
3
4 After:
5   call ale#assert#TearDownLinterTest()
6
7 Execute(The pycodestyle command callback should return default string):
8   AssertLinter 'pycodestyle', ale#Escape('pycodestyle') . '  -'
9
10 Execute(The pycodestyle command callback should allow options):
11   let g:ale_python_pycodestyle_options = '--exclude=test*.py'
12
13   AssertLinter 'pycodestyle',
14   \ ale#Escape('pycodestyle') . ' --exclude=test*.py -'
15
16 Execute(The pycodestyle executable should be configurable):
17   let g:ale_python_pycodestyle_executable = '~/.local/bin/pycodestyle'
18
19   AssertLinter '~/.local/bin/pycodestyle',
20   \ ale#Escape('~/.local/bin/pycodestyle') . '  -'
21
22 Execute(Setting executable to 'pipenv' appends 'run pycodestyle'):
23   let g:ale_python_pycodestyle_executable = 'path/to/pipenv'
24
25   AssertLinter 'path/to/pipenv',
26   \ ale#Escape('path/to/pipenv') . ' run pycodestyle  -'
27
28 Execute(Pipenv is detected when python_pycodestyle_auto_pipenv is set):
29   let g:ale_python_pycodestyle_auto_pipenv = 1
30   call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
31
32   AssertLinter 'pipenv',
33   \ ale#Escape('pipenv') . ' run pycodestyle  -'
34
35 Execute(Setting executable to 'poetry' appends 'run pycodestyle'):
36   let g:ale_python_pycodestyle_executable = 'path/to/poetry'
37
38   AssertLinter 'path/to/poetry',
39   \ ale#Escape('path/to/poetry') . ' run pycodestyle  -'
40
41 Execute(Poetry is detected when python_pycodestyle_auto_poetry is set):
42   let g:ale_python_pycodestyle_auto_poetry = 1
43   call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
44
45   AssertLinter 'poetry',
46   \ ale#Escape('poetry') . ' run pycodestyle  -'
47
48 Execute(uv is detected when python_pycodestyle_auto_uv is set):
49   let g:ale_python_pycodestyle_auto_uv = 1
50   call ale#test#SetFilename('../test-files/python/uv/whatever.py')
51
52   AssertLinter 'uv',
53   \ ale#Escape('uv') . ' run pycodestyle  -'