<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>