I am using the following in pytest-django's tox.ini (via the suggestion in pytest-dev/pytest-django#412 (comment)):
COV_CORE_SOURCE={toxinidir}
COV_CORE_CONFIG={toxinidir}/.coveragerc
COV_CORE_DATAFILE={toxinidir}/.coverage.eager
However, this requires to unset COV_CORE_SOURCE for the inner test runs
(which uses runpytest_subprocess).
I've noticed this because of a warning from pytest:
Module already imported so cannot be rewritten: pytest_cov
This warning however is still triggered by the outer pytest.
It makes sense, but I wonder if there is a better way to load pytest-cov eagerly by now (mentioned in the thread with #412), or if I should just configure the outer pytest to ignore this warning?
Related issue #148.
I am using the following in pytest-django's tox.ini (via the suggestion in pytest-dev/pytest-django#412 (comment)):
However, this requires to unset
COV_CORE_SOURCEfor the inner test runs(which uses
runpytest_subprocess).I've noticed this because of a warning from pytest:
This warning however is still triggered by the outer pytest.
It makes sense, but I wonder if there is a better way to load pytest-cov eagerly by now (mentioned in the thread with #412), or if I should just configure the outer pytest to ignore this warning?
Related issue #148.