diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-04 05:49:16 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-03-04 05:49:16 -0500 |
commit | f43722b1bcb1cdc46bfe42f850fedb6903e90396 (patch) | |
tree | a401bbc965a9444e26bcb2c39198fe6116cee14b /coverage/control.py | |
parent | cdea1cf5178e0e4e802b4d4162f4dd4ed165d4c8 (diff) | |
download | python-coveragepy-git-f43722b1bcb1cdc46bfe42f850fedb6903e90396.tar.gz |
Slightly better way to organize the condition on activity
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/coverage/control.py b/coverage/control.py index a12eb2ee..40c22667 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -797,11 +797,18 @@ class Coverage(object): """ self._init() - if not self.collector.activity(): - return self.data + if self.collector.save_data(self.data): + self._post_save_work() - self.collector.save_data(self.data) + return self.data + + def _post_save_work(self): + """After saving data, look for warnings, post-work, etc. + + Warn about things that should have happened but didn't. + Look for unexecuted files. + """ # If there are still entries in the source_pkgs_unmatched list, # then we never encountered those packages. if self._warn_unimported_source: @@ -835,8 +842,6 @@ class Coverage(object): if self.config.note: self.data.add_run_info(note=self.config.note) - return self.data - def _find_unexecuted_files(self, src_dir): """Find unexecuted files in `src_dir`. |