pip install pytest-cov

pytest --cov=my --cov-report html --cov-branch

Open htmlcov/index.html