From 815b490206f6b4e7afef20d9daf9c3fadde39667 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 17 Feb 2014 12:51:02 +0100 Subject: [PATCH] tox: Add tox config file This allows for testing across multiple environments, including Python 3 in the not too distant future. The instant bonus is that this allows for testing the docs build at Travis so I don't make more releases like 0.18.2 with broken docs. --- .gitignore | 7 ++++--- tox.ini | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index 1ec12cbc..863c9796 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ *.egg-info +*.orig *.pyc *.swp +*~ .coverage .idea .noseids @@ -11,9 +13,8 @@ cover/ coverage.xml dist/ docs/_build/ +js/test/lib/ mopidy.log* node_modules/ nosetests.xml -*~ -*.orig -js/test/lib/ +xunit-*.xml diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..367db508 --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +[tox] +envlist = py27, docs, flake8 + +[testenv] +sitepackages = true +deps = + coverage + mock + nose +commands = nosetests -v --with-xunit --xunit-file=xunit-{envname}.xml --with-coverage --cover-package=mopidy + +[testenv:docs] +deps = -r{toxinidir}/docs/requirements.txt +changedir = docs +commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html + +[testenv:flake8] +deps = flake8 +commands = flake8 docs/ fabfile.py mopidy/ setup.py tests/