forked from saxix/django-concurrency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
91 lines (77 loc) · 2.18 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[tox]
envlist = d{30,31}-py{36,37,38}-{pg,sqlite,mysql}
[pytest]
python_paths=./tests/demoapp/ src
django_find_project = false
DJANGO_SETTINGS_MODULE=demo.settings
norecursedirs = .tox docs ./demoapp/
python_files=tests/test_*.py
addopts =
-q
-p no:warnings
--tb=short
--capture=no
--echo-version django
--echo-attr django.conf.settings.DATABASES.default.ENGINE
--cov=concurrency
--cov-report=html
--cov-config=tests/.coveragerc
pep8ignore = * ALL
markers =
functional: mark a test as functional
admin: admin tests
[testenv]
;install_command=pip install {opts} {packages}
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH PYTHONDONTWRITEBYTECODE
whitelist_externals =
/usr/local/bin/psql
/bin/sh
/usr/local/bin/mysql
/usr/local/mysql/bin/mysql
/usr/bin/psql
changedir={toxinidir}
setenv =
DBNAME = concurrency
pg: DBENGINE = pg
mysql: DBENGINE = mysql
sqlite: DBENGINE = sqlite
deps =
django-reversion
django-webtest
mock
pytest
pytest-cov
pytest-django
pytest-echo
pytest-pythonpath
; py{27,34,35,36,37,38}-pg:
psycopg2-binary
pypy-pg: psycopg2cffi
mysql: mysqlclient
docs: -rdocs/requirements.pip
; d111: django>=1.11,<1.12
; d20: django>=2.0,<2.1
; d21: django>=2.1,<2.2
; d22: django>=2.2,<2.3
d30: django>=3.0,<3.1
d31: django>=3.1,<3.2
commands =
{posargs:pytest tests -rw --create-db}
[testenv:mysql]
commands =
- mysql -u root -h 127.0.0.1 -e 'DROP DATABASE IF EXISTS concurrency;'
- mysql -u root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS concurrency;'
{[testenv]commands}
[testenv:pg]
commands =
- psql -h 127.0.0.1 -c 'DROP DATABASE "concurrency";' -U postgres
- psql -h 127.0.0.1 -c 'CREATE DATABASE "concurrency";' -U postgres
{[testenv]commands}
[testenv:clean]
commands =
mysql: - mysql -u root -e 'DROP DATABASE IF EXISTS concurrency;'
pg: - psql -c 'DROP DATABASE "concurrency";' -U postgres
[testenv:docs]
commands =
mkdir -p {toxinidir}/~build/docs
pipenv run sphinx-build -aE docs/ {toxinidir}/~build/docs