diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 12:36:02 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 12:36:02 -0400 |
commit | f471a289d9677daf8978b15997bd1667e8681661 (patch) | |
tree | eadceef8944689c41ece91b4d3581190b6ccd3bf /coverage | |
parent | a87bfb11160fc30eebaa08375ff263a503c8887d (diff) | |
download | python-coveragepy-f471a289d9677daf8978b15997bd1667e8681661.tar.gz |
Fail command lines that use multiprocessing and other options together. #495
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/cmdline.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index e530640..20d3589 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -602,6 +602,17 @@ class CoverageScript(object): self.help_fn("Can't append to data files in parallel mode.") return ERR + if options.concurrency == "multiprocessing": + # 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: + self.help_fn( + "Options affecting multiprocessing must be specified " + "in a configuration file." + ) + return ERR + if not self.coverage.get_option("run:parallel"): if not options.append: self.coverage.erase() |