Browse code

Simplify tox.ini

Use the factor-conditional settings feature of tox >= 1.8 to reduce
duplication:
https://tox.readthedocs.org/en/latest/config.html#factors-and-factor-conditional-settings

Marius Gedminas authored on 2015/10/04 16:57:49
Showing 1 changed files
... ...
@@ -2,25 +2,12 @@
2 2
 envlist = py26,py27,py34
3 3
 
4 4
 [testenv]
5
-commands = make tests
6 5
 deps = -r{toxinidir}/test-requirements.txt
7 6
 whitelist_externals = make
8
-
9
-[testenv:py26]
10
-commands =
11
-    python --version
12
-    python -m compileall -fq -x 'test|samples|contrib/inventory/vagrant.py' lib test contrib
13
-    make tests
14
-
15
-[testenv:py27]
16
-commands =
17
-    python --version
18
-    python -m compileall -fq -x 'test|samples' lib test contrib
19
-    make tests
20
-
21
-[testenv:py34]
22 7
 commands =
23 8
     python --version
24
-    python -m compileall -fq -x 'lib/ansible/module_utils|lib/ansible/modules' lib test contrib
9
+    py26: python -m compileall -fq -x 'test|samples|contrib/inventory/vagrant.py' lib test contrib
10
+    py27: python -m compileall -fq -x 'test|samples' lib test contrib
11
+    py34: python -m compileall -fq -x 'lib/ansible/module_utils|lib/ansible/modules' lib test contrib
25 12
     # Unittests need lots of work to make code python3 compatible
26
-    #make tests
13
+    py{26,27}: make tests