[TIP] Coverage of application which doesn't end by itself
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 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
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python