diff --git a/tox.ini b/tox.ini index 0541b6cc6c26a3a2150fc3a430807b3775694228..89b12037325e5f4ac238637ce0fa875c09f1ee43 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,13 @@ [tox] envlist = {py34,py35,py36},lint,doc - [testenv] whitelist_externals = make basepython = + doc: python3 + lint: python3 py34: python3.4 py35: python3.5 py36: python3.6 @@ -15,20 +16,25 @@ deps = .[test] commands = - pytest --basetemp={envtmpdir} - pytest --basetemp={envtmpdir} functional_tests/ + # Must specify cov-report explicitly, otherwise coverage starts + # going through the tests as well. + pytest --cov --cov-report=term-missing:skip-covered --basetemp={envtmpdir} tests/ functional_tests/ [testenv:lint] -basepython = python3 deps = .[testlint] commands = flake8 [testenv:doc] -basepython = python3 deps = .[doc] -changedir = {toxinidir}/docs/ +setenv = + # Override Sphinx build directory so we do not trample over user's + # build in source directory. + BUILDDIR={envtmpdir}/docs_build commands = - make html \ No newline at end of file + # Easier to run than changing directory with separate comand. -e + # will ensure the BUILDDIR gets picked-up and overrides the Makefile + # content. + make -C docs/ -e html