From a42999a639b2916b769a85f37d037be314d9d61b Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 15 Jul 2018 18:24:53 +0100 Subject: Massively reduce the amount of code needed for linter tests --- .../test_prospector_command_callback.vader | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'test/command_callback/test_prospector_command_callback.vader') 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' -- cgit v1.2.3