Skip to content

Commit d6fc0d2

Browse files
committed
Run unittests in tox against many Pythons
1 parent a4a0373 commit d6fc0d2

1 file changed

Lines changed: 39 additions & 7 deletions

File tree

tox.ini

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,49 @@
11
[tox]
22
minversion = 3.4.0
3-
envlist = unittest, flake8, docs, bandit, build
3+
skip_missing_interpreters = true
4+
envlist =
5+
{py27, py35, py36, py37, py38}-{unittest},
6+
cover, docs, bandit, build
47

58
[testenv]
6-
basepython = python3
79
usedevelop = True
810
setenv =
911
VIRTUAL_ENV={envdir}
1012
PYTHONWARNINGS=default::DeprecationWarning
11-
install_command = pip install {opts} {packages}
13+
deps = pip >= 19.3.1
14+
install_command =
15+
pip install {opts} {packages}
1216

1317
[testenv:unittest]
1418
deps =
15-
discover
16-
-r{toxinidir}/test-requirements.txt
17-
-r{toxinidir}/requirements.txt
18-
commands = discover -s tests
19+
discover
20+
-r{toxinidir}/test-requirements.txt
21+
-r{toxinidir}/requirements.txt
22+
commands =
23+
discover -s tests
24+
25+
[testenv:py27-unittest]
26+
deps = {[testenv:unittest]deps}
27+
commands = {[testenv:unittest]commands}
28+
29+
[testenv:py35-unittest]
30+
deps = {[testenv:unittest]deps}
31+
commands = {[testenv:unittest]commands}
32+
33+
[testenv:py36-unittest]
34+
deps = {[testenv:unittest]deps}
35+
commands = {[testenv:unittest]commands}
36+
37+
[testenv:py37-unittest]
38+
deps = {[testenv:unittest]deps}
39+
commands = {[testenv:unittest]commands}
40+
41+
[testenv:py38-unittest]
42+
deps = {[testenv:unittest]deps}
43+
commands = {[testenv:unittest]commands}
1944

2045
[testenv:flake8]
46+
basepython=python3
2147
skip_install = true
2248
deps =
2349
flake8
@@ -31,6 +57,7 @@ commands =
3157
flake8 --config .flake8.ini --count --import-order-style pep8 --application-import-names apacheconfig apacheconfig tests {posargs}
3258

3359
[testenv:pylint]
60+
basepython=python3
3461
deps =
3562
pyflakes
3663
pylint
@@ -39,6 +66,7 @@ commands =
3966
pylint apacheconfig
4067

4168
[testenv:cover]
69+
basepython=python3
4270
setenv =
4371
{[testenv]setenv}
4472
PYTHON=coverage run --parallel-mode
@@ -50,17 +78,21 @@ commands = coverage erase
5078
coverage report --fail-under 80
5179

5280
[testenv:bandit]
81+
basepython=python3
5382
skip_install = true
5483
deps =
5584
bandit
5685
commands =
5786
bandit -r apacheconfig -c .bandit.yml
5887

5988
[testenv:docs]
89+
basepython=python3
6090
skip_install = true
91+
whitelist_externals = make
6192
commands = make -C docs html
6293

6394
[testenv:build]
95+
basepython=python3
6496
skip_install = true
6597
deps =
6698
wheel

0 commit comments

Comments
 (0)