diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-02-21 23:19:36 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-02-28 21:52:27 +0100 |
commit | 2e149d2ca8314ec7b4aaaa3b730a2b41bcf9b4a2 (patch) | |
tree | 6c476187916698cf024afb25f88a02b0db66d6f0 | |
parent | b10e05b6321750f6d526c664aaaadfb16f080c3c (diff) | |
download | pylint-git-2e149d2ca8314ec7b4aaaa3b730a2b41bcf9b4a2.tar.gz |
Update tox config
-rw-r--r-- | tox.ini | 112 |
1 files changed, 31 insertions, 81 deletions
@@ -6,8 +6,7 @@ skip_missing_interpreters = true [testenv:pylint] deps = - astroid==2.5.0 - pytest + -r {toxinidir}/requirements_test_min.txt commands = # This would be greatly simplified by a solution for https://github.com/PyCQA/pylint/issues/352 pylint -rn --rcfile={toxinidir}/pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe \ @@ -38,128 +37,79 @@ commands = [testenv:formatting] basepython = python3 deps = - pre-commit - sphinx - pytest + -r {toxinidir}/requirements_test_min.txt + pre-commit==2.10.1 commands = pre-commit run --all-files -changedir = {toxinidir} [testenv:mypy] basepython = python3 deps = - pre-commit + pre-commit==2.10.1 commands = pre-commit run mypy --all-files [testenv] -deps = - astroid==2.5.0 - coverage<5.0 - mccabe - isort - pytest - pytest-xdist - pytest-benchmark - pytest-profiling setenv = COVERAGE_FILE = {toxinidir}/.coverage.{envname} +deps = + -r {toxinidir}/requirements_test.txt commands = ; Run tests, ensuring all benchmark tests do not run - python -Wignore -m coverage run -m pytest --benchmark-disable {toxinidir}/tests/ {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('.tox' + os.sep + os.path.relpath('{envsitepackagesdir}', '{toxworkdir}') + os.sep, '');open(os.environ['COVERAGE_FILE'], 'w').write(cov_strip_abspath)" -changedir = {toxworkdir} + pytest --benchmark-disable {toxinidir}/tests/ {posargs:} [testenv:spelling] deps = - https://github.com/PyCQA/astroid/tarball/master#egg=astroid - pytest - pytest-xdist - pyenchant -commands = - python -Wi -m pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling -changedir = {toxworkdir} - - -[testenv:coveralls] -setenv = - COVERAGE_FILE = {toxinidir}/.coverage -passenv = - * -deps = - coverage<5.0 - coveralls -skip_install = true + -r {toxinidir}/requirements_test.txt commands = - python -m coverage combine - python -m coverage report --rcfile={toxinidir}/.coveragerc -m - - coveralls --rcfile={toxinidir}/.coveragerc -changedir = {toxinidir} + pytest {toxinidir}/tests/ {posargs:} -k unittest_spelling [testenv:coverage-html] setenv = COVERAGE_FILE = {toxinidir}/.coverage deps = - coverage<5 + -r {toxinidir}/requirements_test.txt skip_install = true commands = - python -m coverage combine - python -m coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc -changedir = {toxinidir} + coverage combine + coverage html --ignore-errors --rcfile={toxinidir}/.coveragerc [testenv:docs] -usedevelop = True changedir = doc/ -extras = - docs +deps = + -r {toxinidir}/requirements_docs.txt +skip_install = true commands = - sphinx-build -W -b html -d _build/doctrees . _build/html + sphinx-build -W -b html -d _build/doctrees . _build/html [testenv:benchmark] deps = - astroid==2.5.0 - coverage<5.0 - mccabe - pytest - pytest-xdist - pygal - pytest-benchmark + -r {toxinidir}/requirements_test.txt + pygal commands = ; Run the only the benchmark tests, grouping output and forcing .json output so we ; can compare benchmark runs - python -Wi -m pytest --exitfirst \ - --failed-first \ - --benchmark-only \ - --benchmark-save=batch_files \ - --benchmark-save-data \ - --benchmark-autosave \ - {toxinidir}/tests \ - --benchmark-group-by="group" \ - {posargs:} + pytest --exitfirst \ + --failed-first \ + --benchmark-only \ + --benchmark-save=batch_files \ + --benchmark-save-data \ + --benchmark-autosave {toxinidir}/tests \ + --benchmark-group-by="group" \ + {posargs:} [testenv:profile_against_external] +setenv = + PYTEST_PROFILE_EXTERNAL = 1 deps = - astroid==2.5.0 - https://github.com/PyCQA/astroid/tarball/master#egg=astroid + -r {toxinidir}/requirements_test.txt gprof2dot - mccabe - pytest - pytest-profiling - pytest-xdist -setenv = - PYTEST_PROFILE_EXTERNAL = 1 commands = - python -Wi -m pytest --exitfirst \ - --profile-svg \ - {toxinidir}/tests/profile/test_profile_against_externals.py -changedir = {toxworkdir} + pytest --exitfirst \ + --profile-svg {toxinidir}/tests/profile/test_profile_against_externals.py |