[TIP] Coverage of application which doesn't end by itself

Ned Batchelder ned at nedbatchelder.com
Thu Jun 16 07:39:58 PDT 2016

On 6/16/16 8:30 AM, David Stanek wrote:
> On Wed, Jun 15, 2016 at 11:38 PM Li, Xiaoyan <xiaoyan.li at intel.com 
> <mailto:xiaoyan.li at intel.com>> wrote:
>     Anyone kindly gives me any suggestions how to check code coverage
>     like above test.py?
> I've used the coverage API[1] in webapps to record coverage in very 
> long running processes. I would write coverage data when someone 
> authenticated against a /dump_coverage endpoint. This allowed me to 
> run a series of tests and then dump the coverage for those tests.
> 1. https://coverage.readthedocs.io/en/coverage-4.1/api.html
Another possible approach, though not one I can provide sample code for, 
is to catch a signal that you can send to the process to have it dump 
its state.

> _______________________________________________
> 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/20160616/bfba36dc/attachment.htm>

More information about the testing-in-python mailing list