wsme/tox-tmpl.ini
Chris Dent 78d6b89d18 Enable real testing of python 3.4
The gate 34 tests were not running any tests because there was no
tox target. This changes tox-tmpl.ini (and the resulting tox.ini) to
add support for python 34 and remove support for anything that is
not py34 or py27-based.

To make the python3 tox environments work, the remote zip of a suds
fork has been replaced with suds-jurko, a relatively modern fork of
the original suds that supports python2 and 3.

Some tests needed to be fixed to deal with two main problems:

* reponse bodies being bytes
* Exceptions not having a .message attribute (.args[0] is used
  instead)
* the test_flask tests were not being run for python3, they are now
* wsmeext/sphinxext.py intermittently fails due to the dictionary
  changing size in flight, getting the keys prior to iteration fixes
  it

Both 27 and 34 should be running 420 tests as of this commit.

Change-Id: I837c249714fd957790ea84aa2fd9ad994a39c5ea
2015-04-28 14:59:33 +01:00

131 lines
2.8 KiB
INI

# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = py27,py27-nolxml,pypy,tg11,tg15,cornice,coverage,py34,py34-nolxml,pecan-dev27,pecan-dev34,pep8
[common]
testtools=
nose
coverage < 3.99
pbr
webtest
basedeps=
transaction
pecan
cloud_sptheme
Sphinx < 1.2.99
Flask
flask-restful
[axes]
python=py27,py34,pypy
sqlalchemy=sa5,sa6,sa7*
lxml=lxml*,nolxml
json=json*,simplejson
[axis:python]
deps =
{[common]testtools}
{[common]basedeps}
suds-jurko
commands=
{envbindir}/coverage run {envbindir}/nosetests --nologcapture --with-xunit --xunit-file nosetests-{envname}.xml wsme/tests wsmeext/tests tests/pecantest tests/test_sphinxext.py tests/test_flask.py --verbose {posargs}
{envbindir}/coverage xml -o coverage-{envname}.xml wsme/*.py wsme/rest/*.py wsmeext/*.py
{envbindir}/coverage report --show-missing wsme/*.py wsme/rest/*.py wsmeext/*.py
[axis:python:py27]
basepython=python2.7
[axis:python:py34]
basepython=python3.4
[axis:sqlalchemy:sa5]
deps=
SQLAlchemy<=0.5.99
[axis:sqlalchemy:sa6]
deps=
SQLAlchemy<=0.6.99
[axis:sqlalchemy:sa7]
deps=
SQLAlchemy<=0.7.99
[axis:json:simplejson]
deps=
simplejson
[axis:lxml:lxml]
deps=
lxml
[testenv]
setenv=
COVERAGE_FILE=.coverage.{envname}
[testenv:cornice]
basepython=python2.7
usedevelop=True
deps=
pbr
nose
webtest
coverage < 3.99
cornice
commands=
{envbindir}/nosetests tests/test_cornice.py --with-xunit --xunit-file nosetests-{envname}.xml --verbose --with-coverage --cover-package wsmeext {posargs}
{envbindir}/coverage xml -o coverage-{envname}.xml wsme/*.py wsmeext/cornice.py
[testenv:pecan-dev-base]
deps=
{[common]testtools}
transaction
suds-jurko
https://github.com/stackforge/pecan/zipball/master
[testenv:pecan-dev27]
basepython=python2.7
deps={[testenv:pecan-dev-base]deps}
commands=
{envbindir}/nosetests tests/pecantest --with-xunit --xunit-file nosetests-{envname}.xml --verbose {posargs}
[testenv:pecan-dev34]
basepython=python3.4
deps={[testenv:pecan-dev-base]deps}
commands=
{envbindir}/nosetests tests/pecantest --with-xunit --xunit-file nosetests-{envname}.xml --verbose {posargs}
[testenv:coverage]
basepython=python
deps=
coverage < 3.99
setenv=
COVERAGE_FILE=.coverage
commands=
{envbindir}/coverage erase
{envbindir}/coverage combine
{envbindir}/coverage xml wsme/*.py wsme/rest/*.py wsmeext/*.py
{envbindir}/coverage report --show-missing wsme/*.py wsme/protocols/*.py wsmeext/*.py
[testenv:doc]
deps=
cloud_sptheme
Sphinx < 1.2.99
changedir=
doc
commands=
make clean ziphtml
[testenv:pep8]
deps = flake8
commands = flake8 wsme wsmeext setup.py
# Generic environment for running commands like packaging
[testenv:venv]
commands = {posargs}
usedevelop=True
deps=
pbr