From the course: Create an Open-Source Project in Python

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Why do you need code coverage?

Why do you need code coverage?

- [Instructor] The last topic of this course, we will talk about code coverage. Code coverage is a metric that shows the percentage of our code that is tested. It is not limited to open-source projects, but it is especially important for open-source projects. It is used to measure how much of our code is tested, usually represent with a percentage. There are slightly different ways of measuring code coverage, but in general, it reflects how many lines of code were successfully validated during our tests. But why do we need code coverage? First of all, as an open-source project, we want to show users that our code is well-tested. It's also a good way for developers to check if some code or some features has not been tested. Some projects use it to safeguard their project's contributions so that when there is a pull request, tests need to be written for the new code so that the coverage percentage remains the same or…

Contents