pytest-cov

Pytest plugin for measuring coverage.

Here are some articles that you may find helpful