summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-06-25 08:35:00 -0400
committerNed Batchelder <ned@nedbatchelder.com>2016-06-25 08:35:00 -0400
commit34cdb26ab14c9fe62d782fe4dffa9472a2cf4303 (patch)
treefd116ee3c1d1b19d74f04e1455334d5be849f32b /coverage/cmdline.py
parente84697e061a640ac398b1200d0ebaa96b7ee2e39 (diff)
downloadpython-coveragepy-34cdb26ab14c9fe62d782fe4dffa9472a2cf4303.tar.gz
Combine no longer appends by default
Combine used to always load an existing .coverage file. This lead to confusing results and extra tox-clean steps. Now the default is to not load the existing file, though a new --append switch on coverage combine gets you that behavior if you need it. This also pointed up an issue with concurrency=multiprocessing, which is that the child processes automatically used parallel=True, but the parent process did not. Now concurrency=multiprocessing implies parallel=True.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index e2b79fe..9ff39f4 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -274,7 +274,9 @@ CMDS = {
'combine': CmdOptionParser(
"combine",
- GLOBAL_ARGS,
+ [
+ Opts.append,
+ ] + GLOBAL_ARGS,
usage="<path1> <path2> ... <pathN>",
description=(
"Combine data from multiple coverage files collected "
@@ -484,7 +486,8 @@ class CoverageScript(object):
return self.do_run(options, args)
elif options.action == "combine":
- self.coverage.load()
+ if options.append:
+ self.coverage.load()
data_dirs = args or None
self.coverage.combine(data_dirs)
self.coverage.save()