#!/bin/bash set -e if which virtualenv >/dev/null; then echo else sudo easy_install "virtualenv>=1.8.4" if [ $? -ne 0 ]; then echo "failed to install virtualenv, you'll have to fix this yourself" exit 1 fi fi if [ -z "$VIRTUAL_ENV" ] then virtualenv .tox/tox cd .tox/tox source bin/activate #exit 1 fi if [ -z "$VIRTUAL_ENV" ] then echo This script should only be run inside a virtual_env. exit 1 fi pip install tox --upgrade -v # pytest pytest-cov tox -v