forked from Kotti/Kotti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
27 lines (26 loc) · 998 Bytes
/
tox.ini
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
26
27
[tox]
envlist = {py35,py36}-{postgresql,sqlite,mysql}
[testenv]
deps =
postgresql: psycopg2
mysql: mysqlclient
envdir:
py35: {toxworkdir}/3.5
py36: {toxworkdir}/3.6
setenv:
sqlite: KOTTI_TEST_DB_STRING=sqlite://
py35-mysql: KOTTI_TEST_DB_STRING=mysql://root@localhost:3306/kotti_testing
py36-mysql: KOTTI_TEST_DB_STRING=mysql://root@localhost:3306/kotti_testing
py35-postgresql: KOTTI_TEST_DB_STRING=postgresql://127.0.0.1:5432/kotti_testing
py36-postgresql: KOTTI_TEST_DB_STRING=postgresql://127.0.0.1:5432/kotti_testing
install_command: pip install {opts} {packages}
whitelist_externals =
mysql
psql
commands =
postgresql: psql -U postgres -c 'CREATE DATABASE kotti_testing;'
mysql: mysql -u root -e 'CREATE DATABASE kotti_testing CHARACTER SET utf8 COLLATE utf8_general_ci;'
pip install -e .[testing]
pytest
postgresql: psql -U postgres -c 'DROP DATABASE kotti_testing;'
mysql: mysql -u root -e 'DROP DATABASE kotti_testing;'