diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 19:30:07 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 19:30:07 -0400 |
commit | 2d3759d244a5f88101e208be8c965881f227f65b (patch) | |
tree | 4ca0af03d56096c1631b3f7d1978b0a077a25b0a /coverage/cmdline.py | |
parent | 00f842367a49bc9c0a486cabf0dd01dd36bc72aa (diff) | |
download | python-coveragepy-git-2d3759d244a5f88101e208be8c965881f227f65b.tar.gz |
Fix the check for default values of run-affecting options, and add a test
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 20d35892..1b54e863 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -606,7 +606,9 @@ class CoverageScript(object): # Can't set other run-affecting command line options with # multiprocessing. for opt_name in ['branch', 'include', 'omit', 'pylib', 'source', 'timid']: - if getattr(options, opt_name) != getattr(Opts, opt_name).default: + # As it happens, all of these options have no default, meaning + # they will be None if they have not been specified. + if getattr(options, opt_name) is not None: self.help_fn( "Options affecting multiprocessing must be specified " "in a configuration file." |