File: run_tests

package info (click to toggle)
pyzor 1%3A1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 788 kB
  • ctags: 1,034
  • sloc: python: 6,518; makefile: 154; sh: 19
file content (25 lines) | stat: -rwxr-xr-x 575 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
set -ev

pip install pytest pytest-cov python-coveralls

if [ `python -c 'import sys; print(sys.version_info[0])'` = '3' ]
then
	pip install redis
	python setup.py install
	2to3 -w . ./scripts/pyzor ./scripts/pyzord ./scripts/pyzor-migrate
else
	sudo apt-get update -qq
	sudo apt-get install -y build-essential python-dev libmysqlclient-dev
	pip install -r requirements.txt
	python setup.py install
	mysql -e 'create database pyzor_test'
fi

if [ "$1" != "prepare" ]
then
	py.test tests/unit/ --cov pyzor --cov-report term-missing
	py.test tests/functional/
fi