Hi, @aconrad
I’ve recently started to use pycobertura for my on-going project at work. This is definitely a great tool and I’m already a big fan of this tool. I just have a few questions regarding the pycobertura diff command and its output diff report.
I’m not sure if I fully understand all the columns in the diff report (html format).
Take the dummy files mentioned in README for example. The following is the screenshot:

I didn’t find more details on the definition for each column that I highlighted above, so I was trying to interpret each column in my own understanding. Please correct me if I’m wrong.
Column Stmts:
My understanding is this column indicates how many lines were added or deleted in the new coverage file. For instance, if 2 new lines were added, use “+2” to indicate it. Similarly, if 2 lines were deleted, use “-2”. If no lines added or deleted, use “-“. Let me know if my understanding is correct.
Column Miss:
This column is somewhat confusing. My understanding is that it is a delta part that shows the number of lines from covered to uncovered (or from uncovered to covered) in the new coverage file.
For the file dummy/dummy, it is straightforward to understand “-2”, which means two lines (Line 5 & 6) changed from uncovered to covered.
However, I’m NOT able to make sense of the number “+1” for the file dummy/dummy2. There are two lines (Line 2 & 4) that changed from uncovered to covered, which is -2. There is one line (Line 5) that changed from covered to uncovered, which is +1. In my opinion, it should be “-1” here (-2 + 1 = -1), instead of “+1”. Did I miss anything here?
For the file dummy/dummy3, I’m able to understand the “+2”, as two new lines (Line 1 & 2) were added and not covered. So it is marked as “+2”.
Column Cover:
I also find this column is kinda confusing. I assume this also reflects a delta part that is presented in a percentage form. For the file dummy/dummy, I’m able to understand how +40% is calculated: 2 (lines coverage increase)/ 5 (total lines) = 0.4.
For the file dummy/dummy2, I cannot get how “-25%” was calculated. Can you explain?
For the file dummy/dummy3, it is marked as “-”, and I cannot get it either. What does “-” mean here? Does it mean 0%? And why is it 0%?
Column Missing:
I assume this column also only shows the delta part. In other words, only the lines that have coverage increase/decrease will be listed here. If the same line gets covered (or uncovered) in both old and new coverage file, it won’t appear in the column, correct?
Thanks for your time in advance.
Looking forward to hearing from you soon!
Best,
Chixiang
Hi, @aconrad
I’ve recently started to use pycobertura for my on-going project at work. This is definitely a great tool and I’m already a big fan of this tool. I just have a few questions regarding the pycobertura diff command and its output diff report.
I’m not sure if I fully understand all the columns in the diff report (html format).

Take the dummy files mentioned in README for example. The following is the screenshot:
I didn’t find more details on the definition for each column that I highlighted above, so I was trying to interpret each column in my own understanding. Please correct me if I’m wrong.
Column Stmts:
My understanding is this column indicates how many lines were added or deleted in the new coverage file. For instance, if 2 new lines were added, use “+2” to indicate it. Similarly, if 2 lines were deleted, use “-2”. If no lines added or deleted, use “-“. Let me know if my understanding is correct.
Column Miss:
This column is somewhat confusing. My understanding is that it is a delta part that shows the number of lines from covered to uncovered (or from uncovered to covered) in the new coverage file.
For the file dummy/dummy, it is straightforward to understand “-2”, which means two lines (Line 5 & 6) changed from uncovered to covered.
However, I’m NOT able to make sense of the number “+1” for the file dummy/dummy2. There are two lines (Line 2 & 4) that changed from uncovered to covered, which is -2. There is one line (Line 5) that changed from covered to uncovered, which is +1. In my opinion, it should be “-1” here (-2 + 1 = -1), instead of “+1”. Did I miss anything here?
For the file dummy/dummy3, I’m able to understand the “+2”, as two new lines (Line 1 & 2) were added and not covered. So it is marked as “+2”.
Column Cover:
I also find this column is kinda confusing. I assume this also reflects a delta part that is presented in a percentage form. For the file dummy/dummy, I’m able to understand how +40% is calculated: 2 (lines coverage increase)/ 5 (total lines) = 0.4.
For the file dummy/dummy2, I cannot get how “-25%” was calculated. Can you explain?
For the file dummy/dummy3, it is marked as “-”, and I cannot get it either. What does “-” mean here? Does it mean 0%? And why is it 0%?
Column Missing:
I assume this column also only shows the delta part. In other words, only the lines that have coverage increase/decrease will be listed here. If the same line gets covered (or uncovered) in both old and new coverage file, it won’t appear in the column, correct?
Thanks for your time in advance.
Looking forward to hearing from you soon!
Best,
Chixiang