From bee4695b9dd3ac9aee5d2dc2746a49a37aae0742 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 25 Sep 2014 06:40:09 -0400 Subject: Some error checking and more tests for concurrency control. --- coverage/cmdline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coverage/cmdline.py') diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 51aa5fe5..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." ) + CONCURRENCY_CHOICES = ["thread", "gevent", "greenlet", "eventlet"] concurrency = optparse.make_option( '', '--concurrency', action='store', metavar="LIB", - help="Properly measure code using a concurrency library." + 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", -- cgit v1.2.1