1. Álvaro Justen - Turicas
  2. coverage.py

Commits

Ned Batchelder  committed 00e11e4

Make include and omit work properly in the plugin.

  • Participants
  • Parent commits 1048854
  • Branches default

Comments (0)

Files changed (3)

File coverage/cmdline.py

View file
             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

File coverage/runners/noseplugin.py

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

File coverage/runners/plugin.py

View file
 
 
 options = [
-    optparse.Option('--cover-rcfile', action='store', metavar="RC",
+    optparse.Option('--cover-rcfile', action='store', metavar="RCFILE",
                     help="Specify configuration file.  ['.coveragerc']",
                     default=True),
 
-    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: "