The aim of the project is:
- Display coverage information in SignColumn
- Go to next uncovered chunk of code
- Show tests where current line was executed (pytest only)
Features in action:
For vim-plug
if has('nvim')
Plug 'kalekseev/vim-coverage.py', { 'do': ':UpdateRemotePlugins' }
else
Plug 'kalekseev/vim-coverage.py'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
Editor must be started inside python virtualenv where coverage
package installed otherwise plugin will try to load global coverage
module or fail.
- CoveragePy - show coverage signs for current buffer
- CoveragePyToggle - show / hide coverage
- CoveragePytestContext - show tests where current line was executed. Requires py.test and
--cov-context=test
option. - CoveragePyNext - go to next not covered chunk
Install deps and git hook:
python3 -m venv env && source env/bin/activate
pip install -r dev-requirements.txt
pre-commit install
Lint with:
pre-commit run -a
Run tests with:
PYTHONPATH=./rplugin/python3/ py.test --cov=rplugin --cov-branch --cov-context=test