If I install pytest-xdist plugin, and run pytest --cov with some -n number of parallel processes (even with -n 1), I get this warnings at the end:
Coverage.py warning: Module psautohint was never imported. (module-not-imported)
Coverage.py warning: No data was collected. (no-data-collected)
However, the data is collected, the .coverage.* data file is created, and a report is printed correctly despite the warnings.
If I run without passing the -n xdist option, so not in parallel, I don't get any such warnings.
Similarly I don't get those warning if I run coverage run -m pytest instead of pytest --cov.
I have a .coveragerc file in the root of the repository which contains this:
source = psautohint
[paths]
source =
src/psautohint
.tox/*/lib/python*/site-packages/psautohint
.tox/*/lib/site-packages/psautohint
.tox/pypy*/site-packages/psautohint
If I install pytest-xdist plugin, and run
pytest --covwith some-nnumber of parallel processes (even with-n 1), I get this warnings at the end:However, the data is collected, the
.coverage.*data file is created, and a report is printed correctly despite the warnings.If I run without passing the -n xdist option, so not in parallel, I don't get any such warnings.
Similarly I don't get those warning if I run
coverage run -m pytestinstead ofpytest --cov.I have a .coveragerc file in the root of the repository which contains this: