[TIP] coverage and combining reports

Ned Batchelder ned at nedbatchelder.com
Sun Feb 5 04:39:17 PST 2017


Send me (off-list) a copy of your .coverage data files before and after
the combine step, and also the .coveragerc file. If the project is
public, a link to the repo will be very helpful also.

Frankly, the mapping of files across machines still seems confusing,
even to me! :)


On 2/3/17 11:06 AM, sashk wrote:
> Hello,
> I've run into issue with with coverage during combining reports step.
> My code base supports multiple operating system, so in order to get
> full coverage results, I need to take multiple .coverage files and
> combine them into single one, and then show the report.
> I use tox to run tests, so coverage finds source in the
> $(pwd)/.tox/pyXX/lib/python-X.X/site-packages, but when I run coverage
> combine and report the sources are located in the $(pwd}/src. I
> included both paths into my .coveragerc (see below).
> When I run coverage report --show-missing, I get bunch of errors, that
> it can't find sources like one below:
> /usr/home/gitlab-runner/builds/XXXXXXXX/0/b/project/src/project/zone2hosts.py  
> NoSource: No source for code:
> '/usr/home/gitlab-runner/builds/XXXXXXXX/0/b/project/src/project/zone2hosts.py'.
> Aborting report output, consider using -i.
> I use gitlab-runner to run tests, and paths are different between
> runners. In runner above, $(pwd) part is
> /home/gitlab_ci_multi_runner/builds/XXXXXXXX/0/b/src, but in runner
> where I combine reports $(pwd) part is/root/src. I tried -i option, as
> suggested by error message, but then I get blank report.
> How to make this work? What am I missing?
> my .coveragerc
> [paths]
> source =
>     src
>     .tox/*/lib/python*/site-packages
> Thanks,
> -sashk
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20170205/15307016/attachment.htm>

More information about the testing-in-python mailing list