I discovered that when I run pytest with coverage, the coverage report shows that the tests do not fully cover the code, even though the tests execute the relevant code. Full Coverage Command (100% Coverage) coverage run –source=/root/MyProject/lib_python -m pytest /root/MyProject/tests/lib_python/test_something.py Partial Coverage Command (50% Coverage) cd /root/MyProject; coverage run –source=lib_python -m pytest cd /root/MyProject; coverage run […]