From 47306666e44f0c83c5f3b64ea5cedb1d27657d83 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 9 Jan 2014 21:25:42 -0500 Subject: Peter Portante's coroutine support, but it doesn't work yet. --- coverage/cmdline.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'coverage/cmdline.py') diff --git a/coverage/cmdline.py b/coverage/cmdline.py index c311976..19e0536 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: -- cgit v1.2.1