Issue #136 resolved

Missing code definition coverage?

Anonymous created an issue

I have very strange problem with code coveraging.


(internetowykantor)iMac-Pawe-Bylina:development pbylina$ python test alarm.tests --with-coverage --settings=settings_test --cover-package=alarm --cover-html --cover-html-dir=/tmp/cover --cover-erase --with-doctest --cover-tests nosetests --verbosity 1 alarm.tests --with-coverage --cover-package=alarm --cover-html --cover-html-dir=/tmp/cover --cover-erase --with-doctest --cover-tests

Summary output:

Cover said that is covered only in 54%. HTML output for this module: Can you explain this? Why code definition is marked as missed? With is the same problem, but other modules are ok. What's wrong?

Comments (1)

  1. Ned Batchelder repo owner

    This is covered in the FAQ: You are importing these modules before is started, so the code definitions aren't measured, then the code execution is. You need to start coverage earlier in your process.

  2. Log in to comment