[tox] envlist = py34, py35, py36, py37, py38, pypy, pylint skip_missing_interpreters = true [testenv:pylint] commands = pylint -rn --rcfile={toxinidir}/pylintrc {toxinidir}/astroid # Use pylint master when version info is fixed # pylint: git+https://github.com/pycqa/pylint@master [testenv] deps = pypy: backports.functools_lru_cache pypy: enum34 lazy-object-proxy ; we have a brain for nose ; we use pytest for tests nose py34,py35,py36: numpy py34,py35,py36: attr pytest python-dateutil pypy: singledispatch six wrapt pylint: pylint coverage setenv = COVERAGE_FILE = {toxinidir}/.coverage.{envname} commands = ; --pyargs is needed so the directory astroid doesn't shadow the tox ; installed astroid package ; This is important for tests' test data which create files ; inside the package python -Wi {envsitepackagesdir}/coverage run -m pytest --pyargs astroid {posargs:} ; Transform absolute path to relative path ; for compatibility with coveralls.io and fix 'source not available' error. ; If you can find a cleaner way is welcome python -c "import os;cov_strip_abspath = open(os.environ['COVERAGE_FILE'], 'r').read().replace('{toxinidir}' + os.sep, '');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)" [testenv:coveralls] setenv = COVERAGE_FILE = {toxinidir}/.coverage passenv = * deps = coverage coveralls skip_install = true commands = python {envsitepackagesdir}/coverage combine python {envsitepackagesdir}/coverage report --rcfile={toxinidir}/.coveragerc -m - coveralls --rcfile={toxinidir}/.coveragerc changedir = {toxinidir} [testenv:coverage-erase] setenv = COVERAGE_FILE = {toxinidir}/.coverage deps = coverage skip_install = true commands = python {envsitepackagesdir}/coverage erase changedir = {toxinidir} [testenv:docs] skipsdist = True usedevelop = True changedir = doc/ deps = sphinx commands = sphinx-build -b html . build