[TIP] Resetting or Restarting coverage.py trace
ned at nedbatchelder.com
Sun Oct 16 09:10:48 PDT 2016
On 10/16/16 2:36 AM, Shai Cantor wrote:
> So I'm using coverage.py API
> import coverage
> cov = coverage.Coverage()
> # .. call your code ..
> The main thread creates a coverage instance and starts it.
> During the lifetime of the program I have multiple threads and I need
> every once in while to reset or restart the coverage process (or clear
> coverage data) from one of the underlying threads.
> Problem is that tracing is stopped after I do that. I guess it's
> because I start it from another thread.
> Is there a way I can reset/restart coverage from another thread or
> manually clear coverage data?
I haven't heard this need before, to occasionally reset or clear the
coverage data from one of many threads. Can you say more about what the
bigger picture is here? There might be an easier way to get it done.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python