Skip to content

ankush/frappe_test.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

frappe_test.vim - A custom runner for vim-test plugin

Current features:

testing in action

  1. Run current test file
  2. Run single unit test "near" cursor (through vim-test API)

Setup / requirements

Required plugins:

Installation

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'

Config:

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

Running

  • 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.

VS Code user?

Try VS Code plugin: https://marketplace.visualstudio.com/items?itemName=AnkushMenat.frappe-test-runner


License: same as Vim :h license