All the lines are reported as missing

Issue #289 invalid
sonal_shirwant created an issue

Hi I have some python modules along with their unittests.Unittest are written using python "unittest" framework. I tried using in the interpreter like this :

import coverage



import x.y.z as testablemodule

import x.y.z.tests.unittests as utests

#this tests belong to z module #this runs all the test


This gives coverage of file as 0%


This gives coverage of file as 0%

when we execute tests it calls functions from testablemodule, but then also coverage in 0%

Comments (4)

  1. Ned Batchelder repo owner

    You'll need to provide a runnable example so we can debug the problem.

    The simplest thing is to use coverage to run your tests: "$ coverage run -m unittest discover" or whatever test runner you use. There are many good test runners, these days there isn't much reason to write your own.

  2. Log in to comment