[tox] Generate test environments for Python 2.7 and 3.4

Test commands for each environment are written down explicitly since I could not find a way to extract the "package" name (e.g. "hooks") from the environment name (e.g. "py34-hooks").

For Python 3.4 interpreter, only environments (subpackages) that do not depend on cubes for their tests are listed since those test dependency cubes are not yet installable with Python 3.x. etwist is also not included since the Python 3 port is not complete at the moment.

From local testing, py34 tests pass for the following subpackages:

  • dataimport
  • entities
  • ext
  • hooks
  • wsgi
authorDenis Laxalde <denis.laxalde@logilab.fr>
changesetc74906f1b167
branchdefault
phasedraft
hiddenyes
parent revision#2dafcdd19c99 pep8 bits
child revision<not specified>
files modified by this revision
tox.ini
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1450772580 -3600
# Tue Dec 22 09:23:00 2015 +0100
# Node ID c74906f1b167d10fdc1e4ca1e93a5cd98f410ca6
# Parent 2dafcdd19c9918f6d0bde86b6afdcaf07c1722b3
[tox] Generate test environments for Python 2.7 and 3.4

Test commands for each environment are written down explicitly since I could
not find a way to extract the "package" name (e.g. "hooks") from the
environment name (e.g. "py34-hooks").

For Python 3.4 interpreter, only environments (subpackages) that do not depend
on cubes for their tests are listed since those test dependency cubes are not
yet installable with Python 3.x. etwist is also not included since the Python
3 port is not complete at the moment.

From local testing, py34 tests pass for the following subpackages:

- dataimport
- entities
- ext
- hooks
- wsgi

diff --git a/tox.ini b/tox.ini
@@ -1,7 +1,9 @@
1  [tox]
2 -envlist = cubicweb,dataimport,devtools,entities,etwist,ext,hooks,server,sobjects,web,wsgi
3 +envlist =
4 +  py27-{cubicweb,dataimport,devtools,entities,etwist,ext,hooks,server,sobjects,web,wsgi},
5 +  py34-{dataimport,devtools,entities,ext,hooks,wsgi}
6 
7  [testenv]
8  usedevelop = True
9  sitepackages = True
10  deps =
@@ -14,16 +16,22 @@
11    server: -r{toxinidir}/cubicweb/server/test/requirements.txt
12    sobjects: -r{toxinidir}/cubicweb/sobjects/test/requirements.txt
13    web: -r{toxinidir}/cubicweb/web/test/requirements.txt
14    wsgi: -r{toxinidir}/cubicweb/wsgi/test/requirements.txt
15  commands =
16 -  {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/{envname}/test {posargs}
17 -
18 -[testenv:cubicweb]
19 -commands =
20 -  {envpython} -m pip install --upgrade --no-deps --quiet git+git://github.com/logilab/yapps@master#egg=yapps
21 -  {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/test {posargs}
22 +  cubicweb: {envpython} -m pip install --upgrade --no-deps --quiet git+git://github.com/logilab/yapps@master#egg=yapps
23 +  cubicweb: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/test {posargs}
24 +  dataimport: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/dataimport/test {posargs}
25 +  devtools: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/devtools/test {posargs}
26 +  entities: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/entities/test {posargs}
27 +  etwist: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/etwist/test {posargs}
28 +  ext: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/ext/test {posargs}
29 +  hooks: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/hooks/test {posargs}
30 +  server: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/server/test {posargs}
31 +  sobjects: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/sobjects/test {posargs}
32 +  web: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/web/test {posargs}
33 +  wsgi: {envpython} -c 'from logilab.common import pytest; pytest.run()' -t {toxinidir}/cubicweb/wsgi/test {posargs}
34 
35  [testenv:doc]
36  changedir = doc
37  whitelist_externals =
38    sphinx-build