1. Ned Batchelder
  2. coverage.py


Ned Batchelder  committed 39e8f1b

A seemingly minor change makes all the difference. The nose plugin cover.py excludes reporting on any module imported when coverage started. It imports coverage, then records the list of modules imported. With the coverage.collector import in the constructor, coverage.collector wasn't imported when the snapshot was taken, so coverage.collector appeared in the nose output. By moving the import to module scope, it will be imported early enough to be skipped. Fixes issue #8.

  • Participants
  • Parent commits 0617c1c
  • Branches default

Comments (0)

Files changed (1)

File coverage/control.py

View file
 from coverage.annotate import AnnotateReporter
 from coverage.codeunit import code_unit_factory
+from coverage.collector import Collector
 from coverage.data import CoverageData
 from coverage.files import FileLocator
 from coverage.html import HtmlReporter
         measurement stops.
-        from coverage.collector import Collector
         from coverage import __version__
         self.cover_pylib = cover_pylib