Skip to content

Instantly share code, notes, and snippets.

@scbunn
Last active March 12, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scbunn/5c54bd1300422555495db5c990c0447e to your computer and use it in GitHub Desktop.
Save scbunn/5c54bd1300422555495db5c990c0447e to your computer and use it in GitHub Desktop.
vim function to run testinfra tests in tmux pane
" Salt Development bindings
function! TestInfra (target)
let tests = a:target
execute 'silent !tmux send-keys -t 3 "python -m pytest --spec -vv -m ' . tests . ' tests/" C-m'
:redraw!
endfunction
nnoremap <Leader>t :call TestInfra("unit") <CR>
nnoremap <Leader>T :call TestInfra("integration") <CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment