diff --git a/.circleci/config.yml b/.circleci/config.yml index ba8f8b8abe0..6a6176f6d72 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: - image: 'cimg/python:3.10' environment: TOX_POSARGS: '' + PYTEST_COVERAGE: --cov-report=xml --cov-config .coveragerc --cov=. --cov-append - image: 'docker.elastic.co/elasticsearch/elasticsearch:7.14.0' name: search environment: diff --git a/tox.ini b/tox.ini index 03b74e40bd3..8043aa0dc70 100644 --- a/tox.ini +++ b/tox.ini @@ -16,14 +16,16 @@ deps = -r requirements/testing.txt basepython = python3.10 +# https://pytest-cov.readthedocs.io/en/latest/debuggers.html +# https://github.com/microsoft/vscode-python/issues/693 commands = sh -c '\ export DJANGO_SETTINGS_MODULE=readthedocs.settings.test; \ - pytest --cov-report=xml --cov-config .coveragerc --cov=. --pyargs readthedocs --suppress-no-test-exit-code -m "not proxito and not embed_api" {posargs:{env:TOX_POSARGS:-m "not search and not proxito and not embed_api"}}' + pytest {env:PYTEST_COVERAGE} --pyargs readthedocs --suppress-no-test-exit-code -m "not proxito and not embed_api" {posargs:{env:TOX_POSARGS:-m "not search and not proxito and not embed_api"}}' sh -c '\ export DJANGO_SETTINGS_MODULE=readthedocs.settings.proxito.test; \ - pytest --cov-report=xml --cov-config .coveragerc --cov=. --cov-append --pyargs readthedocs -m proxito --suppress-no-test-exit-code {posargs}' + pytest {env:PYTEST_COVERAGE} --pyargs readthedocs -m proxito --suppress-no-test-exit-code {posargs}' allowlist_externals = sh git