In the previous recipes, test case writing was covered, but there is an important aspect to testing called coverage. Coverage refers to how much of our code has been covered by the tests. The higher the percentage of coverage, the better the test (although high coverage is not the only criterion for good tests). In this recipe, we will check the code coverage of our application.
Determining test coverage
Getting ready
We will use a library called coverage for this recipe. The following is the installation command:
$ pip3 install coverage...