forked from paxswill/evesrp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
75 lines (65 loc) · 2.35 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Cribbed from https://hynek.me/articles/testing-packaging/ for the parallel
# coverage sections.
[tox]
#envlist = py27, py33, py34, py35, pypy, pyp3
envlist =
{py27,py35}-{sqlite,psycopg2,pymysql},
py33-sqlite,
py34-sqlite,
py27-mysqldb,
pypy-sqlite,
pypy3-sqlite
skip_missing_interpreters = true
[db-config]
postgres_user = {env:POSTGRES_USER:postgres}
mysql_user = {env:MYSQL_USER:mysql}
[testenv:docs]
deps =
sphinx
sphinx_rtd_theme
# Required by BraveCore extra
braveapi == 0.1
ecdsa == 0.11
# Required by OAuth extra
requests-oauthlib >= 0.6.0
# If you skip the `--no-binary EVE-SRP` flag, installing extras wil break.
install_command = pip install --no-binary EVE-SRP {opts} {packages}
commands =
pip install --no-binary EVE-SRP EVE-SRP[BraveCore,OAuth]
sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
[testenv]
whitelist_externals =
psycopg2: psql
pymysql,mysqldb: mysql
commands =
# PostgreSQL setup
psycopg2: psql -c 'DROP DATABASE IF EXISTS "evesrp_test_{envname}";' -U {[db-config]postgres_user}
psycopg2: psql -c 'CREATE DATABASE "evesrp_test_{envname}";' -U {[db-config]postgres_user}
# MySQL/MariaDB setup
pymysql,mysqldb: mysql -u {[db-config]mysql_user} -e 'DROP DATABASE IF EXISTS `evesrp_test_{envname}`;'
pymysql,mysqldb: mysql -u {[db-config]mysql_user} -e 'CREATE DATABASE `evesrp_test_{envname}`;'
# SQLite doesn't need any setup
# Run tests with coverage instrumentation
coverage run --rcfile={toxinidir}/.coveragerc {envbindir}/nosetests \
--with-html --html-file=test-report-{envname}.html \
-w {toxinidir}/tests_python
deps =
beautifulsoup4 ~= 4.4.1
httmock ~= 1.2.2
coverage ~= 4.0.3
nose == 1.3.4
nose-htmloutput == 0.5.0
# Include mock for Python 2 interpreters (And pypy3, which is currently
# at Python 3.3).
py27,pypy,pypy3: mock >= 1.0.1
# Various DB handlers
psycopg2: psycopg2
pymysql: pymysql
mysqldb: mysql-python
setenv =
# Database connection parameters
sqlite: DB=sqlite://
psycopg2: DB=postgresql+psycopg2://{[db-config]postgres_user}@127.0.0.1/evesrp_test_{envname}
pymysql: DB=mysql+pymysql://{[db-config]mysql_user}@127.0.0.1/evesrp_test_{envname}
mysqldb: DB=mysql+mysqldb://{[db-config]mysql_user}@127.0.0.1/evesrp_test_{envname}
COVERAGE_FILE={toxinidir}/.coverage.{envname}