| [tox] |
| envlist = py27, py33, py34, py35, py36, pypy, pylint |
| skip_missing_interpreters = true |
| |
| [testenv:pylint] |
| commands = pylint -rn --rcfile={toxinidir}/pylintrc {envsitepackagesdir}/astroid |
| |
| [testenv] |
| deps = |
| # Temporary hack, ignore this. |
| dictproxyhack |
| py27,py33,pypy: enum34 |
| lazy-object-proxy |
| nose |
| py27,py34,py35,py36: numpy |
| pytest |
| python-dateutil |
| py27,py33,pypy: singledispatch |
| six |
| wrapt |
| pylint: git+https://github.com/pycqa/pylint@master |
| coverage |
| |
| # Disable warnings because they overflow the Travis log on 3.5 |
| setenv = |
| COVERAGE_FILE = {toxinidir}/.coverage.{envname} |
| PYTHONWARNINGS = i |
| |
| # {posargs} allows passing command line arguments to unittest |
| commands = |
| python -Wi {envsitepackagesdir}/coverage run -m unittest discover {posargs} -s {envsitepackagesdir}/astroid/tests -p "unittest*.py" |
| ; 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('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}') + 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} |