- Run current test file
- Run single unit test "near" cursor (through vim-test API)
- vim-test to actually run the tests
- vim-rooter to switch to correct root directory.
Add this to your vimrc and do :PlugInstall
. Other package managers should work too.
Plug 'airblade/vim-rooter'
Plug 'vim-test/vim-test'
Plug 'ankush/frappe_test.vim'
Following is minimal recommended config. You may configure it to your preference, refer vim-test documentation for more.
let g:rooter_patterns = ['.git', 'package.json']
let test#custom_runners = {'python': ['Frappe']}
let test#enabled_runners = ["python#frappe"]
let g:test#python#frappe#testsite = "sitename" " important to specify your test site name here
let g:test#python#frappe#arguments = "--skip-before-tests" " arguments to run-test function
- This is totally up to you, you can use
:TestNearest
or:TestFile
command or bind them to a keychord. - I prefer binding
<leader>t{n|f}
for near and file.
Try VS Code plugin: https://marketplace.visualstudio.com/items?itemName=AnkushMenat.frappe-test-runner
License: same as Vim :h license