Do we need to clean up nosetest .coverage files?

190 Views Asked by At

It seems to me that we need to clean up the .coverage hidden files created by nosetest or else nosetest would be confused when I try to run it a second time. It may return cached results in the .coverage file.

The reason I say that is I run nosetests --with-coverage --cover-package=.. It creates .coverage. Then I modify my unittests (e.g. remove an entire test), and I rerun nosetest. I expect the coverage to go down, but it doesn't. That seems wrong.

Next, I remove the .coverage hidden file. Rerun nosetest again, and I see that coverage did go down.

So, do I need to remove .coverage files?

Is there a standard procedure to clean up the .coverage files? Just call rm? Or is there a more correct way? Or is there a way to run nosetest so that it forces a retest instead of reading the .coverage files?

0

There are 0 best solutions below