diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-09-09 10:58:38 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-09-18 08:09:49 -0400 |
commit | 5aa95d1edec75c4f30458773894c7f47c1af0edc (patch) | |
tree | 26601985dd6bfce3822ae4d5f579211d1314497b /coverage/cmdline.py | |
parent | 181f5a78fdbdb7d6f90a478482512297f3a0f845 (diff) | |
download | python-coveragepy-git-5aa95d1edec75c4f30458773894c7f47c1af0edc.tar.gz |
Plumb through context= setting
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 23d2aec3..99b155b2 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -43,6 +43,10 @@ class Opts(object): "Valid values are: %s." ) % ", ".join(CONCURRENCY_CHOICES), ) + context = optparse.make_option( + '', '--context', action='store', metavar="LABEL", + help="The context label to record for this coverage run", + ) debug = optparse.make_option( '', '--debug', action='store', metavar="OPTS", help="Debug options, separated by commas. [env: COVERAGE_DEBUG]", @@ -160,6 +164,7 @@ class CoverageOptionParser(optparse.OptionParser, object): append=None, branch=None, concurrency=None, + context=None, debug=None, directory=None, fail_under=None, @@ -358,6 +363,7 @@ CMDS = { Opts.append, Opts.branch, Opts.concurrency, + Opts.context, Opts.include, Opts.module, Opts.omit, @@ -482,6 +488,7 @@ class CoverageScript(object): debug=debug, concurrency=options.concurrency, check_preimported=True, + context=options.context, ) if options.action == "debug": |