summaryrefslogtreecommitdiff
path: root/test/command_callback/test_prospector_command_callback.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-15 18:24:53 +0100
committerw0rp <devw0rp@gmail.com>2018-07-15 18:28:28 +0100
commita42999a639b2916b769a85f37d037be314d9d61b (patch)
tree5ebfb4d357dc673efa93fd32a66b489c4510de40 /test/command_callback/test_prospector_command_callback.vader
parent5155a35a80fe3b20659eb0f28cc6cc720532dd3f (diff)
downloadale-a42999a639b2916b769a85f37d037be314d9d61b.zip
Massively reduce the amount of code needed for linter tests
Diffstat (limited to 'test/command_callback/test_prospector_command_callback.vader')
-rw-r--r--test/command_callback/test_prospector_command_callback.vader19
1 files changed, 4 insertions, 15 deletions
diff --git a/test/command_callback/test_prospector_command_callback.vader b/test/command_callback/test_prospector_command_callback.vader
index 04cd58ed..316b9883 100644
--- a/test/command_callback/test_prospector_command_callback.vader
+++ b/test/command_callback/test_prospector_command_callback.vader
@@ -1,23 +1,12 @@
Before:
- Save g:ale_python_mypy_executable
- Save g:ale_python_mypy_options
-
- unlet! g:ale_python_mypy_executable
- unlet! g:ale_python_mypy_options
-
- runtime ale_linters/python/prospector.vim
+ call ale#assert#SetUpLinterTest('python', 'prospector')
After:
- Restore
-
- unlet! b:executable
-
- call ale#linter#Reset()
+ call ale#assert#TearDownLinterTest()
Execute(Setting executable to 'pipenv' appends 'run prospector'):
let g:ale_python_prospector_executable = 'path/to/pipenv'
- AssertEqual
+ AssertLinter 'path/to/pipenv',
\ ale#Escape('path/to/pipenv') . ' run prospector'
- \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s',
- \ ale_linters#python#prospector#GetCommand(bufnr(''))
+ \ . ' --messages-only --absolute-paths --zero-exit --output-format json %s'