:compiler pytest
for your Vim.
- Download stable version at vim.org: pytest-compiler
- Or, use a plugin manager and install from https://github.com/5long/pytest-vim-compiler. For example, with vim-plug:
Plug '5long/pytest-vim-compiler'
Just execute :compiler pytest
and you're done.
Well, no. You're going to need one of the following:
- plain
:make
. See Vim docs for more - MakeGreen
- dispatch.vim
Name | type | Default |
---|---|---|
g:pytest_compiler_args |
string | "" |
If set in your vim configuration, it will always be passed to CompilerSet as
additional arguments, saving you the trouble to manually add flags you use every
time (for example: --ff --junit-xml=report.xml
).
You can define this at runtime as well, but you will have to call :compiler pytest
again, after.
Even when defined, you can still pass additional arguments with each make run.
You'll notice that the pytest layout is broken in the quickfix window when running :Dispatch
.
To fix that, install the pytest plugin pytest-vimqf and add the relative flag in your vim configuration:
let g:pytest_compiler_args = "--vim-quickfix"
MIT Licensed. See file LICENSE.