1 #!/bin/bash 2 set -ev 3 4 pip install pytest pytest-cov python-coveralls 5 6 if [ `python -c 'import sys; print(sys.version_info[0])'` = '3' ] 7 then 8 pip install redis 9 python setup.py install 10 2to3 -w . ./scripts/pyzor ./scripts/pyzord ./scripts/pyzor-migrate 11 else 12 sudo apt-get update -qq 13 sudo apt-get install -y build-essential python-dev libmysqlclient-dev 14 pip install -r requirements.txt 15 python setup.py install 16 mysql -e 'create database pyzor_test' 17 fi 18 19 if [ "$1" != "prepare" ] 20 then 21 py.test tests/unit/ --cov pyzor --cov-report term-missing 22 py.test tests/functional/ 23 fi 24 25