From a3d004dbfea23eb01b7ad48dda66e0ae5c85d480 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Thu, 3 Nov 2016 19:09:45 +0000 Subject: [PATCH] tox.ini: add Tox configuration file, with py27, py35, coverage and coveralls environments --- tox.ini | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..76ba9d356 --- /dev/null +++ b/tox.ini @@ -0,0 +1,33 @@ +[tox] +envlist = py27, py35 + +[testenv] +deps = + pytest + -rrequirements.txt +commands = + # run the test suite against the package installed inside tox env + py.test {posargs:--pyargs cu2qu} + +[testenv:coverage] +basepython = {env:TOXPYTHON:python3.5} +deps = + {[testenv]deps} + pytest-cov +skip_install = true +commands= + # measure test coverage and create html report + py.test --cov --cov-report html {posargs} + +[testenv:coveralls] +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH +basepython=python3.5 +deps = + {[testenv:coverage]deps} + coveralls +skip_install = true +ignore_outcome = true +commands= + # measure test coverage and upload report to coveralls + py.test --cov + coveralls