<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Robert, this sounds involved and specific, so let's take it
off-list.</p>
<p>--Ned.<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/13/16 2:14 AM, R M Waters wrote:<br>
</div>
<blockquote
cite="mid:CAE99YyGpTgqUW8-XHu2Ck_ybZHhLM+JGnCWAk5nWuFxmWJTGTg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I am attempting to run individual coverage reports for
tests in a large suite in order to run some analysis on the
suite. I am using nose as the test runner, and executing the
`erase()` and `start()` methods of `coverage.Coverage` between
each test invocation in order to reset the coverage data.</div>
<div><br>
</div>
<div>Some of our test methods follow the same branch pattern,
but with different data (consider testing an encode/decode
function with varying inputs).</div>
<div><br>
</div>
<div>Using PyTracer, I can retrieve the coverage data for each
test via `collector.data`. This includes tests that have the
same branch pattern (it will return same coverage data for
those tests).</div>
<div><br>
</div>
<div>However, using CTracer, I can retrieve coverage data only
for the first invocation of a particular branch pattern.
Subsequent invocations return an empty dict.</div>
<div><br>
</div>
<div>I have even tried replacing the entire `coverage.Coverage`
object for each test, which should guarantee that all of the
data and trace cache on the python side are purged, no dice
though. Is CTracer a singleton?</div>
<div><br>
</div>
<div>I can understand if this is an optimization; when running a
coverage report for a test suite, this is all useless data.</div>
<div><br>
</div>
<div>Is this expected behavior? Am I going to have to go out of
process, or is there an easier solution? </div>
<div><br>
</div>
<div>Thank you so much,</div>
<div>Robert Waters</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
</body>
</html>