How do I make coverage include not tested files?
<p>I have just started writing some unit tests for a python project I have using <code>unittest</code> and <code>coverage</code>. I'm only currently testing a small proportion, but I am trying to work out the code coverage</p>

<p>I run my tests and get the coverage using the following</p>

<pre><code>python -m unittest discover -s tests/
coverage run -m unittest discover -s tests/
coverage report -m
</code></pre>

<p>The problem I'm having is that <code>coverage</code> is telling I have 44% code coverage and is only counting the files that:</p>

<ol>
<li><p>were tested in the unit tests (i.e., all the files that were not tested are missing and not in the overall coverage)</p></li>
<li><p>were in the libraries in the virtual environment and code coverage of the actual tests too. Surely it should not be including the actual tests in the results?</p></li>
</ol>

<p>Furthermore, it says the files that are actually tested in these unit tests only have the first few lines tested (which are in most cases the import statements)</p>

<p>How do I get a more realistic code coverage or is this how it is meant to be?</p>