September 2017
Intermediate to advanced
222 pages
5h 1m
English
Code coverage is a measurement of what percentage of the code under test is being tested by a test suite. When you run the tests for the Tasks project, some of the Tasks functionality is executed with every test, but not all of it. Code coverage tools are great for telling you which parts of the system are being completely missed by tests.
Coverage.py is the preferred Python coverage tool that measures code coverage. You’ll use it to check the Tasks project code under test with pytest.
Before you use coverage.py, you need to install it. I’m also going to have you install a plugin called pytest-cov that will allow you to call coverage.py from pytest with some extra pytest options. Since coverage ...
Read now
Unlock full access