diff options
-rw-r--r-- | tox.ini | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -24,11 +24,11 @@ setenv = COVERAGE_FILE = {toxinidir}/.coverage.{envname} commands = - python -Wi {envsitepackagesdir}/coverage run -m unittest {posargs: discover -s {envsitepackagesdir}/astroid/tests -p "unittest*.py"} + python -Wi -m coverage run -m unittest {posargs: discover -s 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)" + 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 = |