|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
# python-diff-cover
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
Diff coverage is the percentage of new or modified lines that are covered by
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
tests. This provides a clear and achievable standard for code review: If you
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
touch a line of code, that line should be covered. Code coverage is *every*
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
developer's responsibility!
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
The diff-cover command line tool compares an XML coverage report with the
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
output of git diff. It then reports coverage information for lines in the
|
|
![](https://seccdn.libravatar.org/avatar/408f8926d9dccb96ef44c11240469e71c598420f5f12fae033947d4b837299e2?s=16&d=retro) |
343e213 |
diff.
|