Repeated CoverageData.updates cause problems · Issue #415 · nedbat/coveragepy (original) (raw)

Originally reported by Anonymous


Attempting to use the API to get the following behavior:

https://github.com/agroce/tstl/blob/master/src/static/boilerplate_cov.py

has the critical code. Basic structure is just:

if self.oldCovData == None:
    self.oldCovData = newCov
else:
    self.oldCovData.write_file("bug_report.coverage")
    self.oldCovData.update(newCov)

(the write_file is just for bug reporting)

When done without write_file, it hangs and grabs most of CPU/large amounts of RAM. With write_file, the timeout causes testing to stop before that can happen, but the coverage file is huge and claims large numbers of processes. Only testing one program, a simple AVL tree.

Coverage data file is attached.

Note that I also see behavior where it appears that: