summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-01-09 21:25:42 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-01-09 21:25:42 -0500
commit442a0ba30c5c803e649331d8c6e1e449fcc1a161 (patch)
tree3b16654a7aefe3b688164ba7da19cd9a81be8f14 /coverage/cmdline.py
parent521be8203abbcb8308311dd1584b311e5b476f1a (diff)
downloadpython-coveragepy-git-442a0ba30c5c803e649331d8c6e1e449fcc1a161.tar.gz
Peter Portante's coroutine support, but it doesn't work yet.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index c311976d..19e0536e 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -19,6 +19,10 @@ 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."
+ )
debug = optparse.make_option(
'', '--debug', action='store', metavar="OPTS",
help="Debug options, separated by commas"
@@ -121,6 +125,7 @@ class CoverageOptionParser(optparse.OptionParser, object):
self.set_defaults(
actions=[],
branch=None,
+ coroutine=None,
debug=None,
directory=None,
fail_under=None,
@@ -315,6 +320,7 @@ CMDS = {
[
Opts.append,
Opts.branch,
+ Opts.coroutine,
Opts.debug,
Opts.pylib,
Opts.parallel_mode,
@@ -423,6 +429,7 @@ class CoverageScript(object):
omit = omit,
include = include,
debug = debug,
+ coroutine = options.coroutine,
)
if 'debug' in options.actions: