-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
62 lines (49 loc) · 1.88 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
# TODO (move to issue) See https://github.com/tox-dev/tox/issues/189
# for reasons this file is opaque.
[tox]
envlist = {py27,py36,py37,py38,py39}-{unit,examples,flakes,all}-{default,with_numpy}-{dev,pkg}
[_flakes]
commands = flake8
deps = .[tests]
[_unit]
commands = python -c "print('unit')"
doit list
deps = .[tests]
[_examples]
commands = python -c "print('examples')"
deps = .[examples, tests]
[_all]
commands = {[_flakes]commands}
{[_unit]commands}
{[_examples]commands}
deps = .[examples, tests]
[_pkg]
# examples of commands that may be necessary for package only,
# to be run before other commands (e.g. installing examples)
commands = python -c "print('pkg pre cmd')"
[_onlytox]
# testing pyctdev depends on tox.ini and dodo.py
commands = python -c "import shutil,os; shutil.copy(os.path.join('{toxinidir}','dodo.py'),'.'); shutil.copy(os.path.join('{toxinidir}','tox.ini'),'.')"
[testenv]
# change away from git source dir to avoid confusion about what's
# being tested
changedir = {envtmpdir}
commands = {[_onlytox]commands}
pkg: {[_pkg]commands}
unit: {[_unit]commands}
examples: {[_examples]commands}
flakes: {[_flakes]commands}
all: {[_all]commands}
with_numpy: python -c "import numpy;print(numpy.__version__)"
py37: python -c "import sys;assert sys.version_info[0]==3;assert sys.version_info[1]==7;print('ok')"
py36: python -c "import sys;assert sys.version_info[0]==3;assert sys.version_info[1]==6;print('ok')"
py27: python -c "import sys;assert sys.version_info[0]==2;print('ok')"
deps = unit: {[_unit]deps}
examples: {[_examples]deps}
all: {[_all]deps}
flakes: {[_flakes]deps}
with_numpy: numpy
[flake8]
ignore = E,W
include = *.py
exclude = .git,__pycache__,.tox,.eggs,*.egg,doc,dist,build,_build,.ipynb_checkpoints,run_test.py