diff options
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index bd10d5a8..58f4817f 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -19,9 +19,12 @@ class Opts(object): '', '--branch', action='store_true', help="Measure branch coverage in addition to statement coverage." ) - coroutine = optparse.make_option( - '', '--coroutine', action='store', metavar="LIB", - help="Properly measure code using coroutines." + CONCURRENCY_CHOICES = ["thread", "gevent", "greenlet", "eventlet"] + concurrency = optparse.make_option( + '', '--concurrency', action='store', metavar="LIB", + choices=CONCURRENCY_CHOICES, + help="Properly measure code using a concurrency library. " + "Valid values are: %s." % ", ".join(CONCURRENCY_CHOICES) ) debug = optparse.make_option( '', '--debug', action='store', metavar="OPTS", @@ -46,8 +49,8 @@ class Opts(object): include = optparse.make_option( '', '--include', action='store', metavar="PAT1,PAT2,...", - help="Include files only when their filename path matches one of " - "these patterns. Usually needs quoting on the command line." + help="Include only files whose paths match one of these patterns." + "Accepts shell-style wildcards, which must be quoted." ) pylib = optparse.make_option( '-L', '--pylib', action='store_true', @@ -62,14 +65,14 @@ class Opts(object): old_omit = optparse.make_option( '-o', '--omit', action='store', metavar="PAT1,PAT2,...", - help="Omit files when their filename matches one of these patterns. " - "Usually needs quoting on the command line." + help="Omit files whose paths match one of these patterns. " + "Accepts shell-style wildcards, which must be quoted." ) omit = optparse.make_option( '', '--omit', action='store', metavar="PAT1,PAT2,...", - help="Omit files when their filename matches one of these patterns. " - "Usually needs quoting on the command line." + help="Omit files whose paths match one of these patterns. " + "Accepts shell-style wildcards, which must be quoted." ) output_xml = optparse.make_option( '-o', '', action='store', dest="outfile", @@ -125,7 +128,7 @@ class CoverageOptionParser(optparse.OptionParser, object): self.set_defaults( actions=[], branch=None, - coroutine=None, + concurrency=None, debug=None, directory=None, fail_under=None, @@ -320,7 +323,7 @@ CMDS = { [ Opts.append, Opts.branch, - Opts.coroutine, + Opts.concurrency, Opts.debug, Opts.pylib, Opts.parallel_mode, @@ -429,7 +432,7 @@ class CoverageScript(object): omit = omit, include = include, debug = debug, - coroutine = options.coroutine, + concurrency = options.concurrency, ) if 'debug' in options.actions: |