From 609bd9a53c89d6449ee504c266b3d02c15a097d0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 25 Jun 2016 08:35:00 -0400 Subject: 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. --- coverage/cmdline.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'coverage/cmdline.py') diff --git a/coverage/cmdline.py b/coverage/cmdline.py index e2b79fef..9ff39f44 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -274,7 +274,9 @@ CMDS = { 'combine': CmdOptionParser( "combine", - GLOBAL_ARGS, + [ + Opts.append, + ] + GLOBAL_ARGS, usage=" ... ", 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() -- cgit v1.2.1