I have 2 files in my project (a.py
and b.py
). a.py
file is imported in the unit test file (test_prog.py
) and there are tests written for it. Pytest-cov shows the coverage for this file.
However for the other file b.py
- it is not seen in the code coverage output. Pytest-cov does not consider a file for coverage analysis unless it is imported in one of the unit tests?
--cov
argument? – Chrissy--cov=folder_name
wherefolder_name
is a folder that contains the files on which I want to get code coverage analysis. – Singlehearted__init__.py
? – Chrissy__init__.py
file. What is the reason for this? – Singlehearted