1
1
[tox]
2
2
minversion = 1.6
3
- envlist = py36,py34,py27 ,pep8
3
+ envlist = py{35,36,27} ,pep8
4
4
skipsdist = True
5
5
6
6
[testenv]
7
7
usedevelop = True
8
+ basepython = python3
9
+ whitelist_externals =
10
+ find
8
11
install_command = pip install -U {opts} {packages}
9
12
setenv =
10
13
VIRTUAL_ENV ={envdir}
14
+ LC_ALL =en_US.utf-8
15
+ OS_STDOUT_CAPTURE =1
16
+ OS_STDERR_CAPTURE =1
17
+ OS_TEST_TIMEOUT =160
11
18
deps = -r{toxinidir}/requirements.txt
12
19
-r{toxinidir}/test-requirements.txt
13
- commands = python setup.py testr --slowest --testr-args =' {posargs}'
20
+ commands =
21
+ find . -type f -name " *.pyc" -delete
14
22
15
23
[testenv:venv]
16
24
commands = {posargs}
17
25
18
26
[testenv:cover]
19
- commands = python setup.py testr --coverage --testr-args =' {posargs}'
27
+ # TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage]
28
+ # section once we rely on coverage 4.3+
29
+ #
30
+ # https://bitbucket.org/ned/coveragepy/issues/519/
31
+ envdir = {toxworkdir}/shared
32
+ setenv =
33
+ {[testenv]setenv}
34
+ PYTHON =coverage run --source deepaas --parallel-mode
35
+ commands =
36
+ {[testenv]commands}
37
+ coverage erase
38
+ stestr run {posargs}
39
+ coverage combine
40
+ coverage html -d cover
41
+ coverage xml -o cover/coverage.xml
42
+ coverage report
43
+
44
+ [testenv:py27]
45
+ # TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
46
+ basepython = python2.7
47
+ commands =
48
+ {[testenv]commands}
49
+ stestr run {posargs}
50
+
51
+ [testenv:py35]
52
+ # TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
53
+ basepython = python3.5
54
+ commands =
55
+ {[testenv]commands}
56
+ stestr run {posargs}
57
+
58
+ [testenv:py36]
59
+ # TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
60
+ basepython = python3.6
61
+ commands =
62
+ {[testenv:py35]commands}
20
63
21
64
[testenv:pep8]
65
+ envdir = {toxworkdir}/shared
22
66
commands =
23
67
flake8
24
68
# Run security linter
@@ -27,8 +71,7 @@ commands =
27
71
bandit -r deepaas -x tests -s B110,B410
28
72
29
73
[testenv:bandit]
30
- # NOTE(browne): This is required for the integration test job of the bandit
31
- # project. Please do not remove.
74
+ envdir = {toxworkdir}/shared
32
75
commands = bandit -r deepaas -x tests -s B110,B410
33
76
34
77
[flake8]
0 commit comments