Skip to content

Instantly share code, notes, and snippets.

@therako
Last active November 16, 2018 08:24
Show Gist options
  • Save therako/74f54472628c6cd17f1b8096c029836d to your computer and use it in GitHub Desktop.
Save therako/74f54472628c6cd17f1b8096c029836d to your computer and use it in GitHub Desktop.
My mac setup
tmux ls && read tmux_session && tmux -CC attach || tmux -CC
#!/bin/bash
set -e
test_file=$1
open_cov=$2
src_path=$(echo $test_file | sed 's/test_//' | sed 's/tests\///')
if [[ "${open_cov}" = "open" ]]; then
py.test -vv -s ${test_file} --cov=${src_path} --cov-report html:cov_html
open cov_html/index.html
else
py.test -vv -s ${test_file} --cov=${src_path}
rm .coverage
rm -rf cov_html
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment