Last active
November 16, 2018 08:24
-
-
Save therako/74f54472628c6cd17f1b8096c029836d to your computer and use it in GitHub Desktop.
My mac setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux ls && read tmux_session && tmux -CC attach || tmux -CC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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