def find_code_units(self, morfs, omit_prefixes):
     """Find the code units we'll report on.
     
     `morfs` is a list of modules or filenames. `omit_prefixes` is a list
     of prefixes to leave out of the list.
     
     """
     morfs = morfs or self.coverage.data.executed_files()
     self.code_units = code_unit_factory(
                         morfs, self.coverage.file_locator, omit_prefixes)
     self.code_units.sort()
    def analysis2(self, morf):
        """Analyze a module.
        
        `morf` is a module or a filename.  It will be analyzed to determine
        its coverage statistics.  The return value is a 5-tuple:
        
        * The filename for the module.
        * A list of line numbers of executable statements.
        * A list of line numbers of excluded statements.
        * A list of line numbers of statements not run (missing from execution).
        * A readable formatted string of the missing line numbers.

        The analysis uses the source file itself and the current measured
        coverage data.

        """
        code_unit = code_unit_factory(morf, self.file_locator)[0]
        st, ex, m, mf = self._analyze(code_unit)
        return code_unit.filename, st, ex, m, mf
Beispiel #3
0
    def analysis2(self, morf):
        """Analyze a module.
        
        `morf` is a module or a filename.  It will be analyzed to determine
        its coverage statistics.  The return value is a 5-tuple:
        
        * The filename for the module.
        * A list of line numbers of executable statements.
        * A list of line numbers of excluded statements.
        * A list of line numbers of statements not run (missing from execution).
        * A readable formatted string of the missing line numbers.

        The analysis uses the source file itself and the current measured
        coverage data.

        """
        code_unit = code_unit_factory(morf, self.file_locator)[0]
        st, ex, m, mf = self._analyze(code_unit)
        return code_unit.filename, st, ex, m, mf