Ned Batchelder committed 00e11e4

Make include and omit work properly in the plugin.

Comments (0)

Files changed (3)


             return ERR
         # Listify the list options.
-        omit = None
-        if options.omit:
-            omit = pattern_list(options.omit)
-        include = None
-        if options.include:
-            include = pattern_list(options.include)
+        omit = pattern_list(options.omit)
+        include = pattern_list(options.include)
         # Do something.
         self.coverage = self.covpkg.coverage(
 def pattern_list(s):
     """Turn an argument into a list of patterns."""
+    if not s:
+        return None
     if sys.platform == 'win32':
         # When running coverage as coverage.exe, some of the behavior
         # of the shell is emulated: wildcards are expanded into a list of


         """Output code coverage report."""
         log.debug("Coverage report")
-        stream.write("Processing Coverage...")
+        stream.write("Processing Coverage...\n")


 options = [
-    optparse.Option('--cover-rcfile', action='store', metavar="RC",
+    optparse.Option('--cover-rcfile', action='store', metavar="RCFILE",
                     help="Specify configuration file.  ['.coveragerc']",
-    optparse.Option('--cover-report', action='append', default=['report'],
+    optparse.Option('--cover-report', action='append', default=[],
                     dest='cover_reports', type="choice",
                     choices=['annotate', 'html', 'report', 'xml'],
                     help=("Choose what coverage report(s) to create: "
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.