1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #307 duplicate

coverage not correct on the function where coverage was enabled

Anonymous created an issue

I realized that on the function/method where the coverage was enabled,the next statements on the same function or 'parent' functions appear as not covered in the report. However, if one of these statements is a function call, the statements in that function appear as covered. I created an example of this problem. The testMain class spawns a child process. I used multiprocessing since this is the environment where I can reproduce the issue. Note the TestMain.main() method enables coverage, but the self.run_child() call appears as not covered. However, the statements in the self.run_child() method appear as covered.