forked from petl-developers/petl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
84 lines (76 loc) · 2.89 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py27, py36, py37, py38, py39, {py36,py37,py38}-docs
# trick to enable pre-installation of numpy and numexpr
indexserver =
preinstall1 = https://pypi.org/simple
preinstall2 = https://pypi.org/simple
[testenv]
# get stable output for unordered types
setenv =
PYTHONHASHSEED = 42
py27: PY_MAJOR_VERSION = py2
py36,py37,py38,py39: PY_MAJOR_VERSION = py3
commands =
py27,py36,py38,py39: nosetests -v petl --with-coverage --cover-package=petl
py37: nosetests -v --with-coverage --cover-package=petl --with-doctest --doctest-options=+NORMALIZE_WHITESPACE petl -I"csv_py2\.py" -I"db\.py"
coverage report -m
deps =
:preinstall1: Cython<=0.29.21,>=0.29.13
:preinstall1: numpy<=1.19.2,>=1.16.4
:preinstall2: numexpr<=2.7.1,>=2.6.9
-rrequirements-tests.txt
-rrequirements-formats.txt
[testenv:{py36,py37,py38,py39}-docs]
# build documentation under similar environment to readthedocs
changedir = docs
deps =
-rrequirements-docs.txt
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:{py36,py37,py38}-doctest]
commands =
py36,py37,py38: nosetests -v --with-doctest --doctest-options=+NORMALIZE_WHITESPACE petl -I"csv_py2\.py" -I"db\.py"
[testenv:{py36,py37,py38,py39}-dochtml]
changedir = docs
deps =
-rrequirements-docs.txt
commands =
sphinx-build -W -b singlehtml -d {envtmpdir}/doctrees . _build/singlehtml
[testenv:remote]
# Create test containers with the following commands:
# docker run -it --name samba -p 139:139 -p 445:445 -d "dperson/samba" -p -u "petl;test" -s "public;/public-dir;yes;no;yes;all"
# docker run -it --name sftp -p 22:22 -d atmoz/sftp petl:test:::public
setenv =
{[testenv]setenv}
PETL_TEST_SMB=smb://WORKGROUP;petl:test@localhost/public/
PETL_TEST_SFTP=sftp://petl:test@localhost/public/
commands =
nosetests -v petl --with-coverage --cover-package=petl
deps =
{[testenv]deps}
-rrequirements-remote.txt
[testenv:database]
# Create test containers with the following commands:
# docker run -it --name mysql -p 3306:3306 -p 33060:33060 -e MYSQL_ROOT_PASSWORD=pass0 -e MYSQL_DATABASE=petl -e MYSQL_USER=petl -e MYSQL_PASSWORD=test -d mysql:latest
# docker run -it --name postgres -p 5432:5432 -e POSTGRES_DB=petl -e POSTGRES_USER=petl -e POSTGRES_PASSWORD=test -d postgres:latest
setenv =
{[testenv]setenv}
commands =
nosetests -v petl --with-coverage --cover-package=petl
deps =
-rrequirements-tests.txt
-rrequirements-database.txt
[testenv:mysqldb]
basepython = python2.7
setenv =
PYTHONHASHSEED = 42
deps =
MySQL-python==1.2.5
SQLAlchemy==1.2.10
-rrequirements-tests.txt
commands =
nosetests -v --stop petl