/ lab / cover-plugin.txt

== nose cover plugin flow ==

- configure:
    set self.coverPackages: list of names of packages

- begin:
    self.skipModules = sys.modules.keys()[:]
    set coverage.exclude (why?)

- report:
    modules = [ module
            for name, module in sys.modules.items()
            if self.wantModuleCoverage(name, module) ]

- wantModuleCoverage(name, module):
    if self.coverPackages:
        for package in self.coverPackages:
            want_it = False
            if name.startswith(package):
                if self.coverTests:
                    want_it = True
                    want_it = not
                if want_it:
                    return True
    if name in self.skipModules:
        return False

    if and not self.coverTests:
        return False

    return not self.coverPackages

- wantFile:

source, include, omit:

    # self.source is a list of canonical directories for the packages.
    # canon_dir is the canonical directory containing the source file.

    if self.source:
        for s in self.source:
            if is_contained(s, canon_dir):
            # This file wasn't in any source.
            return False
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.