nedbat / coveragepy

The code coverage tool for Python
https://coverage.readthedocs.io
Apache License 2.0
3.01k stars 433 forks source link

coverage erase doesn't remove files generated by parallel/concurrency #635

Open nedbat opened 6 years ago

nedbat commented 6 years ago

Originally reported by Anonymous


Hi,

When running coverage erase, I would expect it cleans .coverage.xx.yy files generated by the previous multithreaded run.

However, on a pure implementation point of view, it might be better to not make it a default, but add a --parallel option to the cleancommand instead.


nedbat commented 6 years ago

Original comment by Jonathan Huot (Bitbucket: JonathanHuot, GitHub: JonathanHuot)


(owner of the issue above)

Note that the workaround is simple:

#!shell

coverage combine || true
coverage erase

However it makes things a bit odd, e.g. before I fully understood that coverage erase was not erasing my files, I published multiples times wrong reports.