diff options
author | Éric Larivière <elarivie@users.noreply.github.com> | 2021-01-30 17:55:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 17:55:11 -0500 |
commit | a0f6692f5cc9344ae790300dcc0cf743ac9abbd3 (patch) | |
tree | 9884b4de9221850ffe5a10f919322d2ffeabdcef /coverage/control.py | |
parent | 0143891b04c0c800fe1a508ab424cbe825f4210b (diff) | |
download | python-coveragepy-git-a0f6692f5cc9344ae790300dcc0cf743ac9abbd3.tar.gz |
Add combine --keep (#1110)
* Add combine --keep
Related to https://github.com/nedbat/coveragepy/issues/1108
* Fix unit tests
* Fix line too long
* Fix line too long
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py index 8d129bcb..c952afcd 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -659,7 +659,7 @@ class Coverage(object): data = self.get_data() data.write() - def combine(self, data_paths=None, strict=False): + def combine(self, data_paths=None, strict=False, keep=False): """Combine together a number of similarly-named coverage data files. All coverage data files whose name starts with `data_file` (from the @@ -674,6 +674,8 @@ class Coverage(object): If `strict` is true, then it is an error to attempt to combine when there are no data files to combine. + If `keep` is true, then combined data files won't be deleted. + .. versionadded:: 4.0 The `data_paths` parameter. @@ -694,7 +696,8 @@ class Coverage(object): for pattern in paths[1:]: aliases.add(pattern, result) - combine_parallel_data(self._data, aliases=aliases, data_paths=data_paths, strict=strict) + combine_parallel_data(self._data, + aliases=aliases, data_paths=data_paths, strict=strict, keep=keep) def get_data(self): """Get the collected data. |