Issue #136 resolved

Missing code definition coverage?

Anonymous created an issue

I have very strange problem with code coveraging.

Command:

(internetowykantor)iMac-Pawe-Bylina:development pbylina$ python manage.py 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: http://pako.overflow.pl/trash/cover_index.html

Cover said that jabber.py is covered only in 54%. HTML output for this module: http://pako.overflow.pl/trash/alarm.jabber.html Can you explain this? Why code definition is marked as missed? With modules.py 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 coverage.py 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