summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-07-30 10:10:08 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-07-30 10:10:08 -0400
commit8b9ba53c845a304dfddc5a78cf0107365edc505d (patch)
treeb705d1398fead7799f841f4576f658138b686212 /coverage/control.py
parente812f4dd7e82a9de6323b139c9ae3e02cd16d7f0 (diff)
downloadpython-coveragepy-8b9ba53c845a304dfddc5a78cf0107365edc505d.tar.gz
Get --append working again.
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/coverage/control.py b/coverage/control.py
index deeeae4..8e51c2c 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -708,19 +708,21 @@ class Coverage(object):
self.get_data()
self.data_files.write(self.data, suffix=self.data_suffix)
- def combine(self, data_dirs=None):
+ def combine(self, data_paths=None):
"""Combine together a number of similarly-named coverage data files.
All coverage data files whose name starts with `data_file` (from the
coverage() constructor) will be read, and combined together into the
current measurements.
- `data_dirs` is a list of directories from which data files should be
- combined. If no list is passed, then the data files from the current
- directory will be combined.
+ `data_paths` is a list of files or directories from which data should
+ be combined. If no list is passed, then the data files from the
+ directory indicated by the current data file (probably the current
+ directory) will be combined.
"""
self._init()
+ self.get_data()
aliases = None
if self.config.paths:
@@ -730,7 +732,7 @@ class Coverage(object):
for pattern in paths[1:]:
aliases.add(pattern, result)
- self.data_files.combine_parallel_data(self.data, aliases=aliases, data_paths=data_dirs)
+ self.data_files.combine_parallel_data(self.data, aliases=aliases, data_paths=data_paths)
def get_data(self):
"""Get the collected data and reset the collector.