title: Python coverage report covering only test file
body: <p>I’m pretty new to contributing to open source projects and am trying to get some coverage reports so I can find out what needs more / better testing. However, I am having trouble getting the full coverage of a test. This is for <a href="https://github.com/pytorch/pytorch" rel="nofollow noreferrer">pytorch</a></p>
  
  <p>For example, lets say I want to get the coverage report of test_indexing_py.</p>
  
  <p>I run the command:</p>
  
  <pre><code>pytest test_indexing.py --cov=../ --cov-report=html
  </code></pre>
  
  <p>Resulting in this:</p>
  
  <pre><code>================================================= test session starts =================================================
  platform win32 -- Python 3.7.4, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
  rootdir: C:\Projects\pytorch
  plugins: hypothesis-5.4.1, arraydiff-0.3, cov-2.8.1, doctestplus-0.4.0, openfiles-0.4.0, remotedata-0.3.2
  collected 62 items
  
  test_indexing.py ............................s.................................                                  [100%]
  
  ----------- coverage: platform win32, python 3.7.4-final-0 -----------
  Coverage HTML written to dir htmlcov
  
  
  =========================================== 61 passed, 1 skipped in 50.43s ============================================
  </code></pre>
  
  <p>Ok, looks like the tests ran. Now when I check the <a href="https://i.stack.imgur.com/r9K92.png" rel="nofollow noreferrer">html coverage report</a>, I only get the coverage for the test file and not for the classes tested (the tests are ordered by coverage percentage).</p>
  
  <p>As you can see, I am getting coverage for only test_indexing.py. How do I get the full coverage report including the classes tested?</p>
  
  <p>Any guidance will be greatly appreciated.</p>