~lightyear/moovida/adocessor

« back to all changes in this revision

Viewing changes to elisa-core/twisted/plugins/coverage_reporter.py

  • Committer: Joshua Eichen
  • Date: 2008-06-06 13:47:23 UTC
  • mfrom: (59.5.2 qa-tweak)
  • Revision ID: jeichen@fluendo.com-20080606134723-mvz6c42sf0h7rk0v
Coverage now started at class instantiation time to capture the loading of
modules and class definitions for statement coverage in files we are interested
in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    files in those directories and creates annotated versions which mark
92
92
    which lines were exectued and were were not.
93
93
    """
 
94
    if coverage:
 
95
        coverage.the_coverage.cache = coverage.the_coverage.cache_default
 
96
        coverage.erase()
 
97
        coverage.start()
 
98
 
94
99
    def __init__(self):
95
 
       if not coverage:
 
100
        if not coverage:
96
101
            raise Exception("coverage module not found. See: "
97
 
              "http://nedbatchelder.com/code/modules/coverage.html")
98
 
       coverage.the_coverage.cache = coverage.the_coverage.cache_default
99
 
       coverage.erase()
100
 
       coverage.start()
101
 
       self.list_of_directories = set()
 
102
                "http://nedbatchelder.com/code/modules/coverage.html")
 
103
        self.list_of_directories = set()
102
104
 
103
105
    def logDirectory(self, test):
104
106
        module = namedAny(test.__module__)